If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 Greater than/Less than a certain Time
 Author Name Remember Me? Password
 Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

## Greater than/Less than a certain Time

 Thread Tools Display Modes
#1
November 23rd 06, 03:01 PM posted to microsoft.public.excel.worksheet.functions
 Phrank external usenet poster Posts: 102
Greater than/Less than a certain Time

Hello,

I've got a helper column (column B) with a formula that looks at a
time stamp in column A. I'm trying to get each cell in column B to
say Yes if the time in the adjoining cell in column A is earlier than
3:30 pm, and No if it's later than 3:30 pm. What I currently have is
below, but this returns the error message #NAME?

=IF(K2="","",IF(K2<3:30 PM,"yes","no"))

I also tried putting the desired cutoff time in quotes (as below), but
that returns 'no' no matter what time is in the cell.

=IF(K2="","",IF(K2<"3:30 PM","yes","no"))

What do I need to change to make this work? Thanks.

Frank
#2
November 23rd 06, 03:18 PM posted to microsoft.public.excel.worksheet.functions
 external usenet poster Posts: 51
Greater than/Less than a certain Time

Try:

=IF(K2="","",IF(K2<Timevalue("3:30 PM"),"yes","no"))

Regards,
Steve

Phrank wrote:

> Hello,
>
> I've got a helper column (column B) with a formula that looks at a
> time stamp in column A. I'm trying to get each cell in column B to
> say Yes if the time in the adjoining cell in column A is earlier than
> 3:30 pm, and No if it's later than 3:30 pm. What I currently have is
> below, but this returns the error message #NAME?
>
> =IF(K2="","",IF(K2<3:30 PM,"yes","no"))
>
> I also tried putting the desired cutoff time in quotes (as below), but
> that returns 'no' no matter what time is in the cell.
>
> =IF(K2="","",IF(K2<"3:30 PM","yes","no"))
>
> What do I need to change to make this work? Thanks.
>
> Frank

#3
November 23rd 06, 03:21 PM posted to microsoft.public.excel.worksheet.functions
 Ron Coderre external usenet poster Posts: 2,118
Greater than/Less than a certain Time

> What do I need to change to make this work?

A little bit of number type coercion:
=IF(K2="","",IF(K2<(--"3:30 PM"),"yes","no"))

The dbl-negative causes Excel to implicitly convert the text "3:30 PM" into
a time value.

Does that help?
***********
Regards,
Ron

XL2002, WinXP

"Phrank" wrote:

> Hello,
>
> I've got a helper column (column B) with a formula that looks at a
> time stamp in column A. I'm trying to get each cell in column B to
> say Yes if the time in the adjoining cell in column A is earlier than
> 3:30 pm, and No if it's later than 3:30 pm. What I currently have is
> below, but this returns the error message #NAME?
>
> =IF(K2="","",IF(K2<3:30 PM,"yes","no"))
>
> I also tried putting the desired cutoff time in quotes (as below), but
> that returns 'no' no matter what time is in the cell.
>
> =IF(K2="","",IF(K2<"3:30 PM","yes","no"))
>
> What do I need to change to make this work? Thanks.
>
> Frank
>

#4
November 23rd 06, 03:42 PM posted to microsoft.public.excel.worksheet.functions
 Phrank external usenet poster Posts: 102
Greater than/Less than a certain Time

#5
November 23rd 06, 04:31 PM posted to microsoft.public.excel.worksheet.functions
 Teethless mama external usenet poster Posts: 3,718
Greater than/Less than a certain Time

Try this:

=IF(K2="","",IF(K2<--"3:30 PM","yes","no"))

"Phrank" wrote:

> Hello,
>
> I've got a helper column (column B) with a formula that looks at a
> time stamp in column A. I'm trying to get each cell in column B to
> say Yes if the time in the adjoining cell in column A is earlier than
> 3:30 pm, and No if it's later than 3:30 pm. What I currently have is
> below, but this returns the error message #NAME?
>
> =IF(K2="","",IF(K2<3:30 PM,"yes","no"))
>
> I also tried putting the desired cutoff time in quotes (as below), but
> that returns 'no' no matter what time is in the cell.
>
> =IF(K2="","",IF(K2<"3:30 PM","yes","no"))
>
> What do I need to change to make this work? Thanks.
>
> Frank
>

#7
November 24th 06, 05:14 AM posted to microsoft.public.excel.worksheet.functions
 Phrank external usenet poster Posts: 102
Greater than/Less than a certain Time

Excellent! All works now. Formatting was wrong. Thank you very much
everyone!

Frank

On Thu, 23 Nov 2006 08:31:01 -0800, Teethless mama
> wrote:

>Try this:
>
>=IF(K2="","",IF(K2<--"3:30 PM","yes","no"))
>
>
>"Phrank" wrote:
>
>> Hello,
>>
>> I've got a helper column (column B) with a formula that looks at a
>> time stamp in column A. I'm trying to get each cell in column B to
>> say Yes if the time in the adjoining cell in column A is earlier than
>> 3:30 pm, and No if it's later than 3:30 pm. What I currently have is
>> below, but this returns the error message #NAME?
>>
>> =IF(K2="","",IF(K2<3:30 PM,"yes","no"))
>>
>> I also tried putting the desired cutoff time in quotes (as below), but
>> that returns 'no' no matter what time is in the cell.
>>
>> =IF(K2="","",IF(K2<"3:30 PM","yes","no"))
>>
>> What do I need to change to make this work? Thanks.
>>
>> Frank
>>

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Excel Newsgroups     Excel Discussion (Misc queries)     Setting up and Configuration of Excel     New Users to Excel     Excel Worksheet Functions     Links and Linking in Excel     Charts and Charting in Excel     Excel Programming About ExcelBanter     About this forum

 Similar Threads Thread Thread Starter Forum Replies Last Post Hot key for time? Dave in Des Moines New Users to Excel 2 March 24th 06 04:31 PM Hot key for time? Dave in Des Moines Excel Worksheet Functions 2 March 24th 06 04:15 PM Hot key for time? Dave in Des Moines Excel Discussion (Misc queries) 1 March 24th 06 03:46 PM time sheet to calculate 2 different columns John Sullivan Excel Worksheet Functions 1 October 21st 05 06:48 AM count TIME that is GREATER than 24 hours JonPilot Excel Worksheet Functions 1 January 31st 05 10:55 PM

All times are GMT +1. The time now is 08:09 PM.

 - Contact Us - ExcelBanter forum home - FAQ - Links - Privacy Statement - Top