+ Reply to Thread
Results 1 to 2 of 2

Comparing Multiple Criteria and dates to return a value or other value

  1. #1
    Registered User
    Join Date
    11-16-2023
    Location
    Minneapolis, MN
    MS-Off Ver
    Office 365
    Posts
    10

    Comparing Multiple Criteria and dates to return a value or other value

    Hello

    I am hoping someone can tackle this challenge with what I am looking to achieve.
    In the spreadsheet, Columns A-C, I have a report that comes in with data.
    In this case, what I am looking to do is get the value for Column E (end date) based on the two tables and based on the data that comes in.
    This is all date based and returns the value which is also the a date.

    I am only concerned with Client Sally. So IF Sally appears in Column A, the formula would look at the Account Code and the transaction date and the closing date
    (in some cases) to determine the End date.

    The tables are broken up by Account Code
    The start and end date ranges are the same for both codes. But the calculation is a bit different per code.

    If the Client is Sally and the Code has EOM4 or EOM5 etc.in Column C, formula would look at the transaction date (column B) and the Account Code (column C) and return the applicable date from
    the EOM table - Columns K-P. Row 8 and Row 9 are examples of this code. For this EOM code, the date returned is always the 30th of the month applicable or the last
    day in February.

    If the client is Sally and the code is "InSeason" in column C, then the formula would also need to also look at the closing date. If both the transaction and closing dates
    fall within the Start and End date- Column R and S, then the value returned should be the first date, Column T, (row 3 as an example). but if the transaction date is
    within the range (Column R and S) and the closing date is after the date in Column T for transaction date (Row 4 example), then the value returned would be from Column U, which is
    essentially 45 days later. For this code, the value returned will either always be the
    15th of the month, or the 30th of the following month except for February which would be the last day of the month.

    Clear as mud?
    SallyCodeProblem.JPG
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Comparing Multiple Criteria and dates to return a value or other value

    Please Login or Register  to view this content.

    Check your dates (year) as I had to modify some to get your expected results.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this 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)

Similar Threads

  1. Comparing Dates in Microsoft Query Criteria
    By tpcervelo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2020, 05:20 AM
  2. Comparing Dates in 2 columns with a complex criteria
    By zayyan18 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2018, 03:22 AM
  3. INDEX/MATCH Formula issue-comparing dates in 4 columns to return a value
    By hopegriffin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-06-2016, 05:15 PM
  4. [SOLVED] Comparing multiple value to return an answer
    By bertique in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2015, 12:48 AM
  5. Return dates that match a single criteria (a countif criteria)
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2014, 12:43 PM
  6. Replies: 5
    Last Post: 06-30-2011, 03:26 PM
  7. return array result in cell based on comparing dates
    By Ruthki in forum Excel Formulas & Functions
    Replies: 51
    Last Post: 09-06-2005, 12:05 PM

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