Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pull data based on month | Excel Discussion (Misc queries) | |||
Selective addition based on criteria | Excel Discussion (Misc queries) | |||
Pull in a colum of financial data based on the month | Excel Worksheet Functions | |||
Get Data based on Month and Year | Excel Worksheet Functions | |||
Referencing data in different worksheet based on month name | Excel Worksheet Functions |