+ Reply to Thread
Results 1 to 10 of 10

Converting monthly data into quarterly

  1. #1
    Registered User
    Join Date
    07-23-2010
    Location
    Amsterdam, NL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Converting monthly data into quarterly

    Dear Excel experts,

    I need to convert several series of monthly data (in rows, one range from Oct 1994-June 2009, i.e., in my sheet columns HD:NZ) into Quarterly data.

    The Quarterly result should simply be the last month of that Quarter, so for Jan-Mar it should return March for Q1, Apr-Jun should return June for Q2, etcetera. There is, however, one caveat: if a quarter's last month does not contain any data or a value of '0' it should return the data for either the first or second preceding month. In the above examples: for Q1 either February or January, for Q2 either May or April.

    Any tips? (No pivot tables or VBA please).

    Many thanks in advance for your kind support!

    Best regards,

    Paul
    Last edited by paulgerrits; 07-27-2010 at 05:00 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting monthly data into quarterly

    something like
    =IF(A1="",ROUNDUP(MONTH(LOOKUP(9.99999999E+307,$A$1:A1))/3,0),ROUNDUP(MONTH(A1)/3,0))
    or
    =CHOOSE(IF(A1="",ROUNDUP(MONTH(LOOKUP(9.99999999E+307,$A$1:A1))/3,0),ROUNDUP(MONTH(A1)/3,0)),"march","june","sept","dec")
    if that doesn't do it post an example with what you want
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-23-2010
    Location
    Amsterdam, NL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Converting monthly data into quarterly

    Thanks for the prompt reply though I couldn't get it to work.

    Please find attached an example.

    Many thanks in advance for your help!

    Best regards,

    Paul
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting monthly data into quarterly

    i have no idea what you want! show a manually generated example

  5. #5
    Registered User
    Join Date
    07-23-2010
    Location
    Amsterdam, NL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Converting monthly data into quarterly

    Please see attached an example. I have manually referred to the cells, of which the values should actually be returned through some formula. I have also added some extra explanation in the sheet. Hopefully it is more clear now!

    Many thanks!

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting monthly data into quarterly

    its doable but its a pig to drag the formula across so i did the first one dragged it across and deleted the cells i didn't need, then dragged what was left down
    probably could make a draggable index with indirect but someone else may give that a go
    Attached Files Attached Files

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting monthly data into quarterly

    Using your sample file (post #5)

    Please Login or Register  to view this content.
    above utilises IFERROR which is new to XL2007 - for prior versions:

    Please Login or Register  to view this content.
    edit: modify delimiters as required per locale config.
    Last edited by DonkeyOte; 07-28-2010 at 09:57 AM.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting monthly data into quarterly

    that gives me a headache lol

  9. #9
    Registered User
    Join Date
    07-23-2010
    Location
    Amsterdam, NL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Converting monthly data into quarterly

    Dear both,

    thanks so much for your helpul review. I have tried the suggestion of DonkeyOte and it works great though there seems to be one glitch for the returns given in Column S which gives data from a column too early in the sequence. The rest is perfrect though.

    Any thoughts on how to solve this?

    Also, a stupid beginner question as well, how do I re-write the formula if the data would be in columns intead of rows?

    Attached an example of what I mean.

    Many thanks in advance!

    Paul

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting monthly data into quarterly

    Quote Originally Posted by paulgerrits
    I have tried the suggestion of DonkeyOte and it works great though there seems to be one glitch for the returns given in Column S which gives data from a column too early in the sequence.
    Something odd with your file there Paul - if you conduct a Full Recalc (CTRL + ALT + F9) you will find the cells will recalculate generating correct results.

    Quote Originally Posted by paulgerrits
    how do I re-write the formula if the data would be in columns intead of rows?
    If you can assume you always have a full quarter listed (ie 3 months each quarter - irrespective of whether or not values are 0) then using your latest sample:

    Please Login or Register  to view this content.
    Again, as before the above utilises IFERROR which is not backwards compatible with versions pre XL2007 - revert to:

    Please Login or Register  to view this content.
    if you need a backwards compatible version

    of course given this layout you could actually just use an embedded IF if you prefer:

    Please Login or Register  to view this content.

+ 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