![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com