excel_padwan

New Member
Joined
Aug 20, 2009
Messages
24
I'm trying to make a spreadsheet calculate the value of overtime worked. However, I only want it to calculate if the value in a specific cell is greater than 8 AND there is a value in another cell. I have been playing around with it and just can't seem to figure it out. Any help would be appreciated.

Right now I use a basic formula: =IF(I7 >8, I7-8, "")
This returns a #value! for cells not containing any text or numbers.

I tried to lay around with this: =IF(OR(C6 <>"",I6 >8),I6-8,"")
However, this returns a negative number because it runs even if I6 is less than 8.

Any help would be appreciated.

Thanks.
EP
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

Use AND rather than OR:

Code:
=IF(AND(C6<>"",I6>8),i6-8,"")
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top