Thread: Calculate Month
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Calculate Month

On Wed, 3 Nov 2004 15:06:02 -0800, Denise
wrote:

I have a table with column headers

8/1/2004 9/1/2004 10/1/2004 ... 3/1/2005

I have to find the column that is 5 months from today and insert a column.
If I run the macro on the 1st of the month or the 31st of the month I should
find the same column.

Thanks,
Denise


Well, to calculate the month that is five months from today, and always come up
with the first of the month, you can use the formula:

dateserial(year(date),month(date)+5,1)


--ron