+ Reply to Thread
Results 1 to 3 of 3

Match nearest weekly date to monthly series, leaving other weeks blank

  1. #1
    Registered User
    Join Date
    05-07-2015
    Location
    herts, england
    MS-Off Ver
    2016
    Posts
    29

    Match nearest weekly date to monthly series, leaving other weeks blank

    I have a series of month-end values like this:

    Apr-15 May-15 Jun-15 Jul-15 Aug-15 Sep-15 Oct-15 Nov-15 Dec-15 Jan-16 Feb-16 Mar-16
    152 149 154 163 161 168 169 166 166 161 157 157


    I also have a separate weekly series. I want a formula that will automatically take the value from the monthly series in the week that most closely matches the month end date. And I want the remaining weeks to stay blank so that I can plot the time-series, connecting the data points with a line.

    My series would look like this:

    12/04/15 19/04/15 26/04/15 03/05/15 10/05/15 17/05/15 24/05/15 31/05/15 07/06/15 14/06/15 21/06/15 28/06/16
    152 149 154

    etc...

    Can anyone help me come up with a formula for the weekly data series that will pull out the matching value from the monthly series, but leave the other weekly values blank?

    Many thanks

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Match nearest weekly date to monthly series, leaving other weeks blank

    For testing, I copied your top table to A1:L2 and your bottom table to A8:L8, adjust the ranges in the formula to suit your actual sheet layout.

    In A9

    =IF(MIN(EOMONTH(A$8,0)-A$8,DAY(A$8))<=3,LOOKUP(EOMONTH(A$8,-1+(DAY(A$8)>3)),$A$1:$L$1,$A$2:$L$2),"")

    Does that help?

  3. #3
    Registered User
    Join Date
    05-07-2015
    Location
    herts, england
    MS-Off Ver
    2016
    Posts
    29

    Re: Match nearest weekly date to monthly series, leaving other weeks blank

    That works perfectly - thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula for converting a date to quarter and leaving blank cell for no date values
    By jayc2111 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2019, 12:57 AM
  2. Replies: 0
    Last Post: 10-27-2015, 10:59 AM
  3. [SOLVED] Determine monthly volume from weekly figures where weeks cross over at month end
    By Grimace in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-21-2012, 09:03 PM
  4. Dividing monthly values into weeks automatically (some months have 5 weeks)
    By massimoo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2012, 03:20 AM
  5. Adding years to a date, but leaving blank if no date in the original cell.
    By buddyhackit9 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2011, 01:17 AM
  6. Replies: 1
    Last Post: 07-11-2008, 05:57 AM
  7. Replies: 0
    Last Post: 04-06-2006, 11:45 AM

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