ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   return date from range of dates with if statement (https://www.excelbanter.com/excel-worksheet-functions/222864-return-date-range-dates-if-statement.html)

Joe

return date from range of dates with if statement
 
I want to search a column that has dates in it like 1/31/2009, 2/28/2009,
3/31/2009, etc. If the date matches a date somewhere else on a sheet I want
it to do something if true and something else if false. I will tell the sheet
what date in B1 and if it finds it

I came up with:
=IFERROR(IF(INDEX(A1:A12,MATCH(B1,A1:A12,0))=B1,"T RUE","FALSE"),"0")

but thiis seems too complicated for what I am asking for.

Ashish Mathur[_2_]

return date from range of dates with if statement
 
Hi,

Try this

=if(countif(A1:A12,B1)0,"do this","do that")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Joe" wrote in message
...
I want to search a column that has dates in it like 1/31/2009, 2/28/2009,
3/31/2009, etc. If the date matches a date somewhere else on a sheet I
want
it to do something if true and something else if false. I will tell the
sheet
what date in B1 and if it finds it

I came up with:
=IFERROR(IF(INDEX(A1:A12,MATCH(B1,A1:A12,0))=B1,"T RUE","FALSE"),"0")

but thiis seems too complicated for what I am asking for.



Joe

return date from range of dates with if statement
 
This is simpler. Thank you.

"Ashish Mathur" wrote:

Hi,

Try this

=if(countif(A1:A12,B1)0,"do this","do that")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Joe" wrote in message
...
I want to search a column that has dates in it like 1/31/2009, 2/28/2009,
3/31/2009, etc. If the date matches a date somewhere else on a sheet I
want
it to do something if true and something else if false. I will tell the
sheet
what date in B1 and if it finds it

I came up with:
=IFERROR(IF(INDEX(A1:A12,MATCH(B1,A1:A12,0))=B1,"T RUE","FALSE"),"0")

but thiis seems too complicated for what I am asking for.




Ashish Mathur[_2_]

return date from range of dates with if statement
 
You are welcome.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Joe" wrote in message
...
This is simpler. Thank you.

"Ashish Mathur" wrote:

Hi,

Try this

=if(countif(A1:A12,B1)0,"do this","do that")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Joe" wrote in message
...
I want to search a column that has dates in it like 1/31/2009,
2/28/2009,
3/31/2009, etc. If the date matches a date somewhere else on a sheet I
want
it to do something if true and something else if false. I will tell the
sheet
what date in B1 and if it finds it

I came up with:
=IFERROR(IF(INDEX(A1:A12,MATCH(B1,A1:A12,0))=B1,"T RUE","FALSE"),"0")

but thiis seems too complicated for what I am asking for.





All times are GMT +1. The time now is 04:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com