Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Roy Roy is offline
external usenet poster
 
Posts: 53
Default mONTH cOMPARISON

I have an excel spreadsheet that takes a date in cell b1 (1/25/206) and ads
7days to it (the new date becomes 2/1/2006) and ecords the new date in cell
b2. What I want to do is if the new value in (ie 2/1/2006) is in a differnt
monththan te originating date then cell b2 woould reocrd the word avg instead
of the date 2/1/2006. Howdo I do this? I am using vba.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default mONTH cOMPARISON

In B2:
=if(month(B1+7)<Month(B1),"avg",B1+7)

format the cell as Date
--
Regards,
Tom Ogilvy



"Roy" wrote:

I have an excel spreadsheet that takes a date in cell b1 (1/25/206) and ads
7days to it (the new date becomes 2/1/2006) and ecords the new date in cell
b2. What I want to do is if the new value in (ie 2/1/2006) is in a differnt
monththan te originating date then cell b2 woould reocrd the word avg instead
of the date 2/1/2006. Howdo I do this? I am using vba.

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
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Excel 2003 month to month data change grid Chad[_2_] Excel Discussion (Misc queries) 2 February 15th 08 01:36 AM
copy worksheet from previous month and rename to current month Dan E. Excel Programming 4 December 8th 05 09:40 PM
Showing data per month & year for comparison gman Excel Discussion (Misc queries) 3 September 7th 05 01:23 AM
transfer cell $ amount to other sheet month-to-month without overc Colin2u Excel Discussion (Misc queries) 1 July 28th 05 02:36 AM


All times are GMT +1. The time now is 06:16 PM.

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

About Us

"It's about Microsoft Excel"