IF Statement Problem

D

Daren

I have written the following IF statement to count how much time is used
during a 1 hour time band, where f6 is actual start time, g6 is actual stop
time, l6 is start of time band, and m6 is end of time band:

=if(f6>=l6,if(f6<m6,if(g6<=m6,g6-f6,m6-f6,0),if(f6<m6,if(g6>l6,if(g6<=m6,g6-l6,m6-l6),0)))

Excel tells me that "I've entered too many arguments" when I enter this
formula, and so it won't calculate the time used in the time band. I've made
sure I typed the formula correctly. Is there a way to correct this?
 
P

Pete_UK

In your 3rd IF you have 3 parameters after the condition expression,
i.e. g6-f6, m6-f6, and 0. I think you need a bracket after the m6-f6
term.

Hope this helps.

Pete
 

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