A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If Then with Today formula



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2009, 03:24 AM posted to microsoft.public.excel.worksheet.functions
JimG
external usenet poster
 
Posts: 53
Default If Then with Today formula

I am trying to subtract one date from another using the Today() formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?
  #2  
Old March 21st, 2009, 03:34 AM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_4_]
external usenet poster
 
Posts: 204
Default If Then with Today formula

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today() formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?

  #3  
Old March 21st, 2009, 04:27 AM posted to microsoft.public.excel.worksheet.functions
JimG
external usenet poster
 
Posts: 53
Default If Then with Today formula

Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today() formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?

  #4  
Old March 21st, 2009, 05:02 AM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_4_]
external usenet poster
 
Posts: 204
Default If Then with Today formula

If 1/1/2008 is in A1 and you want the result in B1 then enter this in B1
=IF((Today()-A1)200,Today()-A1,0)

I had left out the () around the condition..

"JimG" wrote:

Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today() formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?

  #5  
Old March 21st, 2009, 05:05 AM posted to microsoft.public.excel.worksheet.functions
Joel
external usenet poster
 
Posts: 2,855
Default If Then with Today formula

Does this work?

=IF(A1-B2250,A1-B2,0)

Make sure the cell address are right. Sheelo used Today. I simply replaced
Today with the cell B2.

"JimG" wrote:

Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today() formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?

  #6  
Old March 21st, 2009, 05:45 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default If Then with Today formula

If it is under 200 I want it to display the value,
but if over 200 I need it to show zero.


What if the difference *is* 200?

Try this:

A1 = today

=(B1-A1)*(B1-A1200)

--
Biff
Microsoft Excel MVP


"JimG" wrote in message
...
Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today()
formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?



  #7  
Old March 21st, 2009, 06:54 AM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default If Then with Today formula

Based on the OP's data layout, they can use either

=(A1-B1200)*(A1-B1)
or
=IF(A1-B1200,0,A1-B1)

but if you really want to be cute then in C1 enter
=A1-B1
and then apply the following custom format to C1
[200]"0"

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"T. Valko" wrote:

If it is under 200 I want it to display the value,
but if over 200 I need it to show zero.


What if the difference *is* 200?

Try this:

A1 = today

=(B1-A1)*(B1-A1200)

--
Biff
Microsoft Excel MVP


"JimG" wrote in message
...
Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today()
formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?




  #8  
Old March 21st, 2009, 12:37 PM posted to microsoft.public.excel.worksheet.functions
JimG
external usenet poster
 
Posts: 53
Default If Then with Today formula

PERFECT!!! Thanks to everyone for the help!

"T. Valko" wrote:

If it is under 200 I want it to display the value,
but if over 200 I need it to show zero.


What if the difference *is* 200?

Try this:

A1 = today

=(B1-A1)*(B1-A1200)

--
Biff
Microsoft Excel MVP


"JimG" wrote in message
...
Perhaps I am being dense but it isn't working. Here is a sample of what I
have
A1 B1 C1
3/21/2009 Request Date Days in Processing
1/1/2008 445
3/21/09 is Today() and the result is 445. If it is under 200 I want it to
display the value, but if over 200 I need it to show zero.

I appreciate the help

"Sheeloo" wrote:

=IF(A1-Today()250,A1-Today(),0)

with date in A1...

You can change the comparison according to your logic.

"JimG" wrote:

I am trying to subtract one date from another using the Today()
formula, but
if the value is greater than 250 I want to return the value of 0.

Can someone help?




 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.