#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Lookup

This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Lookup

=IF(AND(WEEKDAY(A1)=5,ISNUMBER(MATCH(A1,B1:B4,0))) ,"something","something
else")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Lookup

Michael,

If you need an exact match:

=IF(ISERROR(MATCH(A1,B1:B4,FALSE)),"a something","something else")

If you need it within the range defined by the dates in B1:B4

=IF(AND(A1=MIN(B1:B4),A1<=MAX(B1:B4)),"something else","a something")

HTH,
Bernie
MS Excel MVP


wrote in message
oups.com...
This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Lookup

Try one of these:

=IF(AND(TEXT(A1,"DDD")="THU",COUNTIF(B1:B4,A1)),"U se this","otherwise this")
or
=IF(AND(WEEKDAY(N(A1))=5,COUNTIF(B1:B4,A1)),"Use this","otherwise this")

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

XL2002, WinXP


" wrote:

This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Lookup

That did it! I tried the other two, but couldn't get them to work.
This one was awesome. Thanks a lot for your help...

Ron Coderre wrote:
Try one of these:

=IF(AND(TEXT(A1,"DDD")="THU",COUNTIF(B1:B4,A1)),"U se this","otherwise this")
or
=IF(AND(WEEKDAY(N(A1))=5,COUNTIF(B1:B4,A1)),"Use this","otherwise this")

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

XL2002, WinXP


" wrote:

This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Lookup

Thanks for the feedback....I'm glad that worked for you.

***********
Regards,
Ron

XL2002, WinXP


" wrote:

That did it! I tried the other two, but couldn't get them to work.
This one was awesome. Thanks a lot for your help...

Ron Coderre wrote:
Try one of these:

=IF(AND(TEXT(A1,"DDD")="THU",COUNTIF(B1:B4,A1)),"U se this","otherwise this")
or
=IF(AND(WEEKDAY(N(A1))=5,COUNTIF(B1:B4,A1)),"Use this","otherwise this")

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

XL2002, WinXP


" wrote:

This should be easy, but for the life of me I can't figure it out. I
have one cell that has a date (a1) in it. I want to verify that date
against a range of dates (b1:b4) (it needs to be in that range) that I
have in a column, while using an if/and statement. The statement I
want to use is something to the effect of (in words): if a1 is a
thursday and is in the range b1:b4, give me a something, otherwise give
me something else. Am I making this harder than it should be?




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
Another way to lookup data David Vollmer Excel Worksheet Functions 1 September 23rd 05 05:16 AM
lookup more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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