Excel Formula help - capture the 1st result

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

Hi,

Is it possible to get a single cell in Excel to just run a forumla once.

I need to keep the first result without it being over written. Currently when other factors change the formula re-run's, overwriting the original result.

What I need is a way to capture the result when the formula triggers the 1st time ie. no matter what happens there after I have the 1st result captured.

Any ideas ?

Cheers,
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

Mtrend

Try this (can also go in the worksheet calculate event).

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If IsEmpty(Range("a1")) Then
Range("a1").Formula = "=SUM(b1:e1)"
Range("a1") = Range("a1").Value
End If

End Sub

Nigel.
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

Thanks Nigel Il give it a go tonight after work & let you know !

Ta
mtrend
Posts: 90
Joined: Sun Sep 06, 2009 6:46 pm

That works a treat, thanks

Ordered 3 excel books from Amazon so hopefully soon il be able to help some people out :ugeek:
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”