hi ranjeet.bhagat57, you can have a list somewhere to do a VLOOKUP.
Feb Jan
Mar Feb
Apr Mar
May Apr
Jun May
Jul Jun
Aug Jul
Sep Aug
Oct Sep
Nov Oct
Dec Nov
i placed this in the "Jan" worksheet, G1:H11. you can place it anywhere else. so if my current worksheet is Feb, it'll read Jan on the 2nd column.
=C6-INDIRECT(VLOOKUP(RIGHT(CELL("filename",$A$1),3),Jan!$G$1:$H$11,2,0)&"!D"&ROW(D6))
you can also choose not to put the list anywhere & make it fixed like this:
=C6-INDIRECT(VLOOKUP(RIGHT(CELL("filename",$A$1),3),{"Feb","Jan";"Mar","Feb";"Apr","Mar";"May","Apr";"Jun","May";"Jul","Jun";"Aug","Jul";"Sep","Aug";"Oct","Sep";"Nov","Oct";"Dec","Nov"},2,0)&"!D"&ROW(D6))
Bookmarks