Computing.Net > Forums > Office Software > Excel IF statement

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel IF statement

Reply to Message Icon

Name: tallicagrrl
Date: August 23, 2007 at 15:40:21 Pacific
OS: NT
CPU/Ram: Intel 3 128
Product: Dell
Comment:

I'm am setting up a spreadsheet to track fuel consumption and hour of heavy equipment. I have conditional formatting set to change the color of a cell when a peice of equipment is set for it's 250 service hour. How would I set an IF statement to start over every 250 hours? I'm sure it would be easier with a macro or VBA, but I have zero experience with those. I have put in about 5 hours trying to get this right, any help in the right direction would be very much appreciated.


Well, you say you want a Revolution Well, you know it's time.



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: August 24, 2007 at 10:23:41 Pacific
Reply:

I think we need another piece of information.

When the hours of operation gets above a 250 hour threshold and CF changes the color of the cell, how does your spreadsheet know that the maintenance has actually been performed? In other words, I don't think you want the cell reset at 256 if the maintenance hasn't been performed yet.

I can come up with a formula that will format the cell only at exactly 250 hour increments but I don't think that's what you want.



0

Response Number 2
Name: tallicagrrl
Date: August 24, 2007 at 14:53:52 Pacific
Reply:

Actually that is exactly what I need, I have a check off area for service performed. The CF tells me to generate the work order and then I check it.

If you could show me that would be wonderful DerbyDad! I don't think I can afford to pull out anymore hair...:-)

Well, you say you want a Revolution Well, you know it's time.


0

Response Number 3
Name: DerbyDad03
Date: August 24, 2007 at 20:50:57 Pacific
Reply:

I don't really think this is what you want, but...

If you CF cell A1 using Formula Is and use the formula below, it will get formatted only when A1 equals exactly 250, 500, 750, etc.

=MOD(A1,250)=0

The MOD function returns the remainder of the first argument (e.g. A1) divided by the second argument (250). If the remainder is 0, A1 gets formatted.

I've also PM'd an email address. If this isn't what you are looking for, perhaps you could email a copy of the spreadsheet so I can see what you are trying to do first hand.


0

Response Number 4
Name: 24HG_Hoop
Date: August 29, 2007 at 14:19:45 Pacific
Reply:

Easiest solution is to use conditional formatting. Highlight the column where the numbers (0-250+) will be and click on Format -> Conditional Formatting. In there, set cell greater than or equal to 250 to hit the Format button and go to the Patterns tab and click on the red color (or whatever color) and hit OK to exit out.

Whenever it hits 250, it'll turn red.

I've also got a macro, if needed, that will count the number of red cells, so you could have a "Things needed to be fixed: ____" and have the next cell over be the sum of all red-highlighted cells.


0

Response Number 5
Name: DerbyDad03
Date: August 29, 2007 at 17:17:42 Pacific
Reply:

25HG_Hoop:

I've been trying to get some more info from the OP because I don't think that is what he wants.

I *think* he wants the cell to turn red at each 250 hour milestone. i.e. The cell turns red at 250 hours. Then he uses another cell to note that the work is scheduled and/or done which turns off the red in the hour counting cell. Then when the hours reach 500, it turns red again until he resets it with the other cell. Then red at 750, 1000, 1250, etc.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel IF statement

Microsoft Excel IF Statement www.computing.net/answers/office/microsoft-excel-if-statement/4444.html

Excel IF Statement Help Needed www.computing.net/answers/office/excel-if-statement-help-needed/7417.html

Excel IF statements and conditional www.computing.net/answers/office/excel-if-statements-and-conditional/7035.html