Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default new formula after condition met

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default new formula after condition met

Salut Vincent,

As long as you type in cell E1 "OIL CHANGE" ...
you can use starting in cell E2 the following formula ...

=IF(AND((D2-(INDIRECT(ADDRESS(SUMPRODUCT(MAX((ROW($E$1:E1))*($ E$1:E1=$E
$1))),4,2)))=245),E1=""),"OIL CHANGE","")

HTH
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Condition formula Herb Excel Discussion (Misc queries) 2 April 1st 09 12:07 AM
Please Help Again-Condition Formula Kareinia Excel Worksheet Functions 5 March 6th 08 08:06 PM
Condition Formula Kareinia Excel Worksheet Functions 4 March 6th 08 04:17 PM
MORE THAN ONE CONDITION IN A FORMULA CLM Excel Worksheet Functions 5 January 18th 07 01:21 PM
If formula and #N/A as a condition EstherJ Excel Discussion (Misc queries) 2 August 23rd 05 02:52 PM


All times are GMT +1. The time now is 04:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"