#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Date Math

I have 2 columns, ADM and DISC. These are both date fields in the format of
6/20/2006.

In a column next to these 2 columns, I want to create a formula that will
check the difference between the 2 dates. If the date difference reaches 30
days, I would like for it to place a 1 in there, otherwise, nothing. I've had
problems trying to create the if statement, but have had no sucess in doing
it...can someone help me.

Thank you
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Date Math


metaltecks,

You should be able to structure your function as follows

=if((B1-A1)30,1,"")

Where B1 & A1 are your current columns

Steve

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Date Math

You do not state which is always the larger. I will assume second column (B)
=IF(B2-A2=30, 1, "")
If either can be the greater
=IF(ABS(B2-A2)=30, 1, "")
Sometimes (but apparently not here), Excel will automatically format a cell
for dates when it contains a formula uses dates - just format as General if
this happens
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"metaltecks" wrote in message
...
I have 2 columns, ADM and DISC. These are both date fields in the format of
6/20/2006.

In a column next to these 2 columns, I want to create a formula that will
check the difference between the 2 dates. If the date difference reaches
30
days, I would like for it to place a 1 in there, otherwise, nothing. I've
had
problems trying to create the if statement, but have had no sucess in
doing
it...can someone help me.

Thank you



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Date Math


metaltecks Wrote:
I have 2 columns, ADM and DISC. These are both date fields in the format
of
6/20/2006.

In a column next to these 2 columns, I want to create a formula that
will
check the difference between the 2 dates. If the date difference
reaches 30
days, I would like for it to place a 1 in there, otherwise, nothing.
I've had
problems trying to create the if statement, but have had no sucess in
doing
it...can someone help me.

Thank you

Hi metaltechs,

Try something like this

=IF(B1-A1=30,1,"") , if more that 30 then "30"

Change format of C1 to number

oldchippy :)


--
oldchippy
------------------------------------------------------------------------
oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
View this thread: http://www.excelforum.com/showthread...hreadid=566605



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
Date format issue CindyLF1 New Users to Excel 3 June 12th 06 06:18 PM
Insert Automatic, Non-Updating Date Stamp Ken Zenachon Excel Discussion (Misc queries) 8 January 18th 06 06:52 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM
Date Math Problem Dkline Excel Worksheet Functions 4 March 4th 05 04:11 PM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"