Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)="2005",true_value,false_value)

"Mike" wrote:

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

Thank You so much I have been trying to figure out that formula on and off
for weeks. Do You work for Microsoft or do you just provide free advice
to people?

"bpeltzer" wrote:

Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)="2005",true_value,false_value)

"Mike" wrote:

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

Just an Excel geek sharing some and learning some via the communities...

"Mike" wrote:

Thank You so much I have been trying to figure out that formula on and off
for weeks. Do You work for Microsoft or do you just provide free advice
to people?

"bpeltzer" wrote:

Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)="2005",true_value,false_value)

"Mike" wrote:

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

If you have the time I have a a really complicated and Puzzling Excell
question that also involves the "IF" formula between two worksheets. Do you
have an e-mail you would be willing to communicate over or do you perfer the
Microsoft "Chat room"?

"bpeltzer" wrote:

Just an Excel geek sharing some and learning some via the communities...

"Mike" wrote:

Thank You so much I have been trying to figure out that formula on and off
for weeks. Do You work for Microsoft or do you just provide free advice
to people?

"bpeltzer" wrote:

Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)="2005",true_value,false_value)

"Mike" wrote:

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Woodloch
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

Maybe you can help. Saw this and this is my question.

I have a date say 1/1/2005 in say cell J7; I want to write an if formula
that says if J7 is less than 7/1/2006 then it returns "expired" and if not it
returns "current"

Thanks

"bpeltzer" wrote:

Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)="2005",true_value,false_value)

"Mike" wrote:

How do I use an "IF" function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN "x"),IF( a date in one cell ends in 2006 THEN
"Y"), " ")

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?


Try this

=IF(J7="","",IF(J7<"7/1/2006"+0,"expired","current"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=498736

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Woodloch
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

That works! Thanks so much but could you tell me why you couldn't simply say
=if (J7 < 7/1/2006, "expired", "current")

"daddylonglegs" wrote:


Try this

=IF(J7="","",IF(J7<"7/1/2006"+0,"expired","current"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=498736


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default How do I use an "IF" formula using dates in excell?

7/1/2006 = 7 divided by 1 divided by 2006 (=0.00349). It's not a date.

By using date(2006,7,1) or having excel coerce the text "7/1/2006" (with +0) to
a date, the formula could evaluate the way you want.

Woodloch wrote:

That works! Thanks so much but could you tell me why you couldn't simply say
=if (J7 < 7/1/2006, "expired", "current")

"daddylonglegs" wrote:


Try this

=IF(J7="","",IF(J7<"7/1/2006"+0,"expired","current"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=498736



--

Dave Peterson
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
Formula to find the working days difference between to dates? Mudgeman Excel Discussion (Misc queries) 2 May 15th 06 04:26 AM
Formula help for counting,with a column of dates and a column of n Altstatten Excel Worksheet Functions 2 December 8th 05 09:32 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula including dates R L Sandel Excel Worksheet Functions 2 May 25th 05 12:30 PM
Dates by week, formula appeng Excel Worksheet Functions 5 February 6th 05 10:48 PM


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