+ Reply to Thread
Results 1 to 4 of 4

Formula required to reference date range

  1. #1
    Registered User
    Join Date
    06-11-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    12

    Formula required to reference date range

    Hello all. Really stuck on a formula and would love it if anyone had any ideas. Excel sheet attached demonstrating the problem.

    Data return Tab shows a list of contracts and the date the contract was invoiced. The problem is, there are multiple amendments to each contract (Amendment info tab) and I need the formula to look up the contract number and the invoice date and then look at the amendment table to return the correct contract amendment.

    This is easy to do for one contract at a time like this https://www.extendoffice.com/documen...ate-range.html
    however this does not work once you have lists of multiple contract numbers.

    I am racking my brains on this and if I could figure this out it would be a momentous time saver. Any suggestions are welcome and if I havent explained myself sufficiently then please do let me know.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.85 for Mac MS 365
    Posts
    8,514

    Re: Help needed please. Formula required to reference date range

    this appears to work...
    =LOOKUP(2,1/('AMENDMENT INFO'!$A$3:$A$128=A4)/('AMENDMENT INFO'!$C$3:$C$128<=B4)*('AMENDMENT INFO'!$D$3:$D$128>=B4),'AMENDMENT INFO'!$E$3:$E$128)
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Formula required to reference date range

    You could do it with a horrible array formula:

    In 'DATA RETURN'!C4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Formula required to reference date range

    You could, of course, use Power Query.

    Format your source data as tables (named "Invoices" and "Amendments"), then use:

    Please Login or Register  to view this content.
    Example attached.
    Attached Files Attached Files

+ 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 required for criteria as cell reference
    By Yadavgiri in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-27-2017, 08:38 AM
  2. Replies: 0
    Last Post: 05-30-2017, 08:01 AM
  3. [SOLVED] VBA code required not to execute during certain date and time range
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2015, 08:57 PM
  4. Replies: 2
    Last Post: 12-09-2013, 11:02 PM
  5. [SOLVED] Formula required to return 2 latest records in a date range
    By Backroomgeeza in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 10-23-2012, 05:53 AM
  6. Replies: 1
    Last Post: 04-18-2012, 05:49 PM
  7. Formula required for date without changing the date format
    By suryaprasad in forum Excel General
    Replies: 1
    Last Post: 01-28-2009, 08:04 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