+ Reply to Thread
Results 1 to 7 of 7

Finding the last value in a week from daily data

  1. #1
    Registered User
    Join Date
    04-20-2009
    Location
    NYC, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Finding the last value in a week from daily data

    Column A = Date
    Column B = Numbers
    Column C = results

    As you can see Column C, I manually did what I want the formula to do, which is get last number from the previous week. (weekdays only, but can be either 1,2,3,4 or 5 days due to holidays)
    Attached Files Attached Files
    Last edited by borabora12; 04-20-2009 at 05:49 PM.

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Finding the last value in a week from daily data

    How's that attached look to ya?
    Could mash that into one formula I suppose, but it's easier to follow the logic when left as is. Helper column contains =WEEKDAY(A1) then the answer column references that with an offset and reference to the weekday as per how many rows to shift.

    IE
    Please Login or Register  to view this content.
    and then
    Please Login or Register  to view this content.
    The formulas can both be dragged down as far as needed, let me know if that helps.

    mew!
    Attached Files Attached Files
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    04-20-2009
    Location
    NYC, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Finding the last value in a week from daily data

    looks great! just wondering how I could mash that together?

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Finding the last value in a week from daily data

    Please Login or Register  to view this content.
    Put that in C3 and drag down.

    mew!

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Finding the last value in a week from daily data

    Without helper columns you could use this formula in C3

    =VLOOKUP(MAX(IF(A3:A$30<=A3-1-WEEKDAY(A3),A3:A$30)),A3:B$30,2,0)

    needs to be confirmed with CTRL+SHIFT+ENTER and then copied down....

  6. #6
    Registered User
    Join Date
    04-20-2009
    Location
    NYC, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Finding the last value in a week from daily data

    thanks guys!!!!

  7. #7
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Finding the last value in a week from daily data

    Thank you for marking your thread as solved!

+ 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