Formula Assistance

G

Guest

Ok…here’s the scenario:
I have a formula…

=IF(ISBLANK('Check-In'!F4),SUM((D8-C8)*24),SUM((F8-E8)*24,(D8-C8)*24))

I need this formula to add the totals of two cells (D8-C8) if a particular
cell on another sheet is blank. If the cell on the other sheet is not blank I
need it to sum the same two cells (D8-C8) in addition (+) to the sum of two
additional cells (F8-E8).

Can anyone see anything wrong with what I have so far? Any ideas or
suggestions would be most helpful.

Thank you for your time and look forward to any assistance.
 
D

Domenic

Try...

=IF(ISBLANK('Check-In'!F4),(D8-C8)*24,((F8-E8)*24)+((D8-C8)*24))

Hope this helps!
 
J

jordun

Hi
he p[roblem seems to be the sybtax of the ranges in the SUM functions

=IF(ISBLANK('Check-In'!F4),SUM((D8-C8)*24),SUM((F8-E8)*24,(D8-C8)*24))

1 - SUM((D8-C8)*24)--> the range syntax is C8:D8, when you write D8-C8
you are telling Excel D8 minus C8

2 - The same for SUM((F8-E8)


I guess your formula should look like this:
=IF(ISBLANK('Check-In'!F4),SUM((D8:D8)*24),SUM((F8:E8)*24,(D8:C8)*24))
 
G

Guest

1) You don't offer a hint of what issue you are experiencing
2) You don't need the SUM() function
3) Since you are ALWAYS adding 24*(D8-C8), the formula could be shorter:

=24*((D8-C8)+IF(ISBLANK('Check-In'!F4),(F8-E8),0))
 
G

Guest

Got it....This is what I came up with...
=IF('Check-In'!F4="",(D8-C8)*24,((F8-E8)*24)+((D8-C8)*24))

Thanks much for your assistance! Have a great day!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top