Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default Month based data addition to worksheet

I am building a data base in one worksheet that takes data from another
worksheet. The data is filled in monthly but I want to only fill the data in
if the the month is either current month or prior and keep rolling as the
months advance. I have a method to do this if only dealing with one calendar
year (=IF(Previous Month="","",IF(MONTH(TODAY())(MONTH(Previous
Month)+1),Previous Month+32,"")), but this of course doesn't work for a
Dec/Jan transition. Any suggestions?

Also, I'm interested in just date stamping MONTH/YEAR...the day is not
important. In my formula I advance the date by 32 days to advance the date
by a month but there obviously would be a few days of the year where the
formula would break down and the output would not yield what I want (for my
purposes this is not a big deal but if there is a better way to do this...)

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Month based data addition to worksheet

.. I want to only fill the data in
if the the month is either current month or prior
and keep rolling as the months advance.


Assuming dates are entered in Sheet2's col A, from A2 down
Perhaps something like this in Sheet1's A2, copied down:
=IF(Sheet2!A2="","",IF(DATE(YEAR(Sheet2!A2),MONTH( Sheet2!A2),1)<=DATE(YEAR(TODAY()),MONTH(TODAY()),1 ),Sheet2!A2,""))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Brian" wrote:
I am building a data base in one worksheet that takes data from another
worksheet. The data is filled in monthly but I want to only fill the data in
if the the month is either current month or prior and keep rolling as the
months advance. I have a method to do this if only dealing with one calendar
year (=IF(Previous Month="","",IF(MONTH(TODAY())(MONTH(Previous
Month)+1),Previous Month+32,"")), but this of course doesn't work for a
Dec/Jan transition. Any suggestions?

Also, I'm interested in just date stamping MONTH/YEAR...the day is not
important. In my formula I advance the date by 32 days to advance the date
by a month but there obviously would be a few days of the year where the
formula would break down and the output would not yield what I want (for my
purposes this is not a big deal but if there is a better way to do this...)

Thanks in advance.

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
Pull data based on month MikeJ Excel Discussion (Misc queries) 5 January 4th 08 04:50 PM
Selective addition based on criteria Randy L Excel Discussion (Misc queries) 3 January 23rd 07 05:51 PM
Pull in a colum of financial data based on the month Bradon Excel Worksheet Functions 1 September 15th 06 07:37 AM
Get Data based on Month and Year karstens Excel Worksheet Functions 1 August 2nd 06 12:42 AM
Referencing data in different worksheet based on month name cosmo_canuck Excel Worksheet Functions 3 August 22nd 05 07:27 AM


All times are GMT +1. The time now is 09:37 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"