Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default IF Statement Problem

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(g6l6,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?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Statement Problem

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

On Sep 18, 1:58 pm, Daren wrote:
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(g6l6,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?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default IF Statement Problem

Thanks a lot, Pete. I put in the missing parenthesis and it worked!
Daren

"Pete_UK" wrote:

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

On Sep 18, 1:58 pm, Daren wrote:
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(g6l6,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?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Statement Problem

You're welcome, Daren - thanks for feeding back.

Pete

On Sep 18, 2:42 pm, Daren wrote:
Thanks a lot, Pete. I put in the missing parenthesis and it worked!
Daren



"Pete_UK" wrote:
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


On Sep 18, 1:58 pm, Daren wrote:
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(g6l6,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?- Hide quoted text -


- Show quoted text -



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
If statement problem Scott@CW Excel Discussion (Misc queries) 1 April 26th 07 03:40 PM
Problem with IF statement Connie Martin Excel Worksheet Functions 11 November 24th 06 09:29 PM
problem with IF statement wolfpack95 Excel Discussion (Misc queries) 1 August 21st 06 08:36 PM
IF statement problem Ross Excel Discussion (Misc queries) 6 July 13th 06 04:47 PM
IF statement problem simon Excel Worksheet Functions 1 December 30th 04 10:59 AM


All times are GMT +1. The time now is 08:25 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"