Thread
:
new formula after condition met
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
new formula after condition met
I'm not quite sure if you meant d1 or d9 in your example but something like
this should help. Probably need to change my , to your ;
Sub doformulas()
For i = 10 To 40 Step 10
ms = "if(d" & i & "-d" & i - 1 & "=245,""oil "","""")"
Cells(i, "e").Formula = "=" & ms & ""
Next i
End Sub
'=IF(D10-D$1=245;"OIL CHANGE";"")
' IF(D20-D$19=245;"
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Vincent" wrote in message
...
First of all, Merry Christmas to everyone
I´ll Try to explain my problem with an example.
I use this simple formula down the column E to solve my problem
(TEMPORARILY):
E10 =IF(D10-D$1=245;"OIL CHANGE";"")
After condition met i have to change that formula manually.
Assuming that D19-D1=249, I will have to insert
in cell E20 =IF(D20-D$19=245;"OIL CHANGE";"")
So, AFTER each oil change, i need to CHANGE the locked cell. I guess i
need
a macro for this one, but then again maybe not :)
Thanks everyone
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett