+ Reply to Thread
Results 1 to 8 of 8

Find last previous non blank value and summarise previous 6 months

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Find last previous non blank value and summarise previous 6 months

    Please see attached file. Need to find latest non blank value - in attached file it is highlighted in yellow. From there, want to summarise 26 weeks back so, in the attached file:

    Row 2 would be finding 750 and summarised back 26 weeks from 30 sep 2012
    Row 3 would be finding 2250 and summarised back 26 weeks from 2 dec 2012
    Row 4 would be finding 5000 and summarised back 26 weeks from 4 nov 2012

    Thanks in advance
    Shaz
    Attached Files Attached Files

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Find last previous non blank value and summarise previous 6 months

    OK - I am going to post this beast - but if any Excel Guru wants to improve on it/correct it - PLEASE DO!

    The formula below is for row 2. You can copy it down for rows 3, 4, etc.
    This seems to be returning the correct values:

    I'll leave this formula here so people can learn from my mistakes... I don't recommend using it.
    See my formula in post #5 below for a formula without volatile functions!
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Moo
    Last edited by Moo the Dog; 12-11-2012 at 02:54 AM. Reason: See post #5 of this thread for a better formula. Don't use this one!

  3. #3
    Registered User
    Join Date
    12-03-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Find last previous non blank value and summarise previous 6 months

    Thanks heaps Moo, It works wonderfully :-)

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Find last previous non blank value and summarise previous 6 months

    Glad to help.

    Like I said above, if anyone has another solution, feel free to offer it up.

    - Moo

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Find last previous non blank value and summarise previous 6 months

    Here is a MUCH better (safer) way of doing this. I knew I would figure it out eventually!

    It would probably be a good idea to switch to this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    You can use that for row 2, then paste/fill down for the other rows.

    It is a non-volatile method. The previous formula used OFFSET -AND- INDIRECT... two volatile functions - not my best work.

    Have fun!

    - Moo

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Find last previous non blank value and summarise previous 6 months

    if anyone has another solution, feel free to offer it up
    Not sure whether this...

    In AY2 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Please explain me with a file about the expected outcome, if the above formula is not the expected one.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  7. #7
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Find last previous non blank value and summarise previous 6 months

    @Sixth - see my attached modified file (I updated my formula in post #5) The OP wants to sum a 26-week span in each row that terminates at the final value in each row (varies).

    I originally proposed a formula using OFFSET and INDIRECT, but knew there was a better (safer) way to do it... and I came up with this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It looks for the cell that is 25 columns to the left of the column holding the row's last value, and sums from that cell, to (and including) the cell with the last value in the row. I hope that makes sense.

    - Moo
    Attached Files Attached Files

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Find last previous non blank value and summarise previous 6 months

    @Moo, Thanks for the brief and the file.

    Another approach

    In AY2 Cell
    Formula: copy to clipboard
    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