Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I need a formula to calculate the quarterly sales of a product based on the current month plus 2 previous months Cell A3 indicates the current month formatted as mmm Column A is the product starting at A5 Columns B - M are the sales by month, starting at B5 for Jan, C5 for Feb etc What is the formula I need in cell O5 to give me the quarterly sales based on the value in cell A3 eg if the value in cell A3 is *Mar* the formula should add the sales in cell B5:D5, if the value in A3 is changed to *Jun* the formula should add the sales in cells E5:G5 etc Thanks in advance for any help -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=564257 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() If A3 is a date formatted as mmm try =SUM(OFFSET(B5:D5,,MAX(0,MONTH(A3)-3))) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=564257 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() daddylonglegs Wrote: If A3 is a date formatted as mmm try =SUM(OFFSET(B5:D5,,MAX(0,MONTH(A3)-3))) Thanks daddylonglegs that worked a treat, have a similar thing in another spreadsheet where the month in the cell is formatted as text eg JAN, how would the above formula have to be changed to work in that scenario? -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=564257 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() In that case, assuming the same references as for your previous example but with months, e.g. "Jan", "Feb" etc. in B4:M4 =SUM(OFFSET(B5:D5,,MAX(0,MATCH(A3,B4:M4,0)-3))) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=564257 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() daddylonglegs Wrote: In that case, assuming the same references as for your previous example but with months, e.g. "Jan", "Feb" etc. in B4:M4 =SUM(OFFSET(B5:D5,,MAX(0,MATCH(A3,B4:M4,0)-3))) Thanks again -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=564257 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i automatically replace formula with results | Excel Worksheet Functions | |||
Help! All results of my formula are the same! | Excel Discussion (Misc queries) | |||
CSE formula results | Excel Discussion (Misc queries) | |||
How do I view formula results intead of formula in excel? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions |