LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default If statement based on time ranges

I am trying to ask that a percentage is returned whether a time
entered into cell B10 falls within one of four blocks of time. It is
working for the first three time ranges, but the last one is giving me
zero for all times entered in that range (6pm - midnight).

Here is my almost working formula:

=IF(AND(B10TIME(24,0,0),B10<=TIME(6,0,1)),
100%,IF(AND(B10TIME(6,0,1),B10<TIME(12,0,1)),
75%,IF(AND(B10=TIME(12,0,0),B10<TIME(18,0,1)),
50%,IF(AND(B10TIME(18,0,0),B10<TIME(24,0,1)),25%, 0))))

I think the problem is my 'false' entry, but I don't know what should
be there. Can you help?

Thank you!
 
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 then statement based on time of day Sabosis Excel Programming 3 June 24th 11 01:00 AM
Multiple If Then Statement based on ranges Multiple If, Then statements Excel Worksheet Functions 5 November 18th 09 07:08 PM
IF statement for time based data Daren Excel Worksheet Functions 13 October 22nd 06 04:19 AM
union of named ranges based only on the names of those ranges sloth Excel Programming 3 October 2nd 06 03:18 AM
Using an IF statement on time based data DonB Excel Discussion (Misc queries) 11 December 3rd 05 04:07 AM


All times are GMT +1. The time now is 10:38 AM.

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"