View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
andy62 andy62 is offline
external usenet poster
 
Posts: 158
Default manipulating dates

If I understand correctly, you want to add 7 or 30 or 365 days to a current
date, based on the text in another cell. For instance,

A B C
3/14/2007 weekly 3/21/2007
3/14/2007 monthy 4/13/2007

There are other ways of doing this, but I would put a nested IF statement
into column C, such as:

=IF(B1="weekly",A1+7,IF(B1="monthly",A1+30,IF(B1=" annual",A1+365,"")))

Then copy C1 down to all your rows. Remember to format column C as a date.
I would also apply data validation to your column B so that the text is
always accurate.

Another option is to use a VLOOKUP which finds the text from column B in
another range somewhere and returns the value associated with it, such as:

weekly 7
monthy 30
annual 365

Then you'd again be adding that value to what was in column A.

HTH
"ghostinhawaii" wrote:

How so I set up a spreadsheet or databse to recognize the text, weekly as 7
days monthly 30 and annual as 365 and then apply that to a current date to
see a future date? I have not been able to figure this out. thanks