Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Take a look at this formula, it takes a date in a1 then subtracts the the
number of days in the month before to return the month number of the month before. Since it uses the days in the previous month, it can never go back two months if that makes since. =TEXT(A1-(TEXT(EOMONTH(A1,1),"dd")),"mm") -- -John Please rate when your question is answered to help us and others know what is helpful. "Sandy" wrote: Hello I have a monthly file My File mm-yyyy.xls. I am trying to reference last months file using cell C1 (Named month) and indirect.ext using cell("FILENAME'). The month portion of the formula is evaluating to 01 no matter the month. My formula: =INDIRECT.EXT("'"&LEFT(CELL("FILENAME",A1),FIND("-",CELL("FILENAME",A1))-3)&TEXT((MO-1),"MM")&"-"&YR&".xls]Monthly Summary'!$"&"b$37") What should I change in TEXT((MO-1) so it will evaluate to the previous month. I realize that January will be a problem and plan on manually entering the values unless some one has a suggestion for that too. Thanks!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional format if change to contents of cell | Excel Discussion (Misc queries) | |||
How do I format one cell based on contents in another cell in Exce | Excel Discussion (Misc queries) | |||
Can I format a row based on the contents of one cell? | Excel Discussion (Misc queries) | |||
Conditionally format one cell for contents of another? | Excel Worksheet Functions | |||
Copying format to a new cell, w/o overwriting destination cell contents | Excel Discussion (Misc queries) |