+ Reply to Thread
Results 1 to 5 of 5

Formula Help to Calculate Quarterly Results

  1. #1
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Formula Help to Calculate Quarterly Results

    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

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,759
    If A3 is a date formatted as mmm try

    =SUM(OFFSET(B5:D5,,MAX(0,MONTH(A3)-3)))

  3. #3
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by daddylonglegs
    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?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,759
    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)))

  5. #5
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by daddylonglegs
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1