View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Dates - Months & Years

Add these formula on sheet2

A1: =Sheet1!A2
A2: =Sheet1!A1
B1: =IF(A2="Jan",A1+A1,A1)
B2: =TEXT(DATE(A1,MONTH(DATEVALUE("01 "&A2&" 2005"))+1,1),"mmm")

copy B1:B2 across

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rick" wrote in message
...
I am looking for a formula or a way to have years & months calculated from

a
starting month and year. Here is what I have.

Sheet 1 has 2 cells, cell A1 is for picking the starting month (from a

drop
down list) & cell A2 is to pick the starting year (also from a drop down
list).

Sheet 2 is set up with a 36 month grid in which estimated hours are input.
What I need it to do is automatically calculate the year (in cell row 1)

and
the month (in cell row 2) based on the selections made on sheet 1. Also,

I
need it to automatically roll to the next higher year when ever the month
"Jan" comes up (see D1,2). I would like it to display year & month as

shown
here.

(A) (B) (C) (D)
(1) 2005 2005 2005 2006 and so for a total of 36 months
(2) Oct Nov Dec Jan