+ Reply to Thread
Results 1 to 3 of 3

Excel function that produces text if date matches specific range, and 2 cells match

  1. #1
    Registered User
    Join Date
    05-09-2017
    Location
    MA, US
    MS-Off Ver
    2007
    Posts
    1

    Excel function that produces text if date matches specific range, and 2 cells match

    Hi,

    Im sure there is an easy way to do this, but having some trouble.

    Say I have 5 colums
    A1 - is a date
    A2 - Is an order qty
    A3 - Is a reserve qty
    A4 - Is a Y or N value
    A5 - is where I need my results

    I need a function (Im assuming an =IF function, with maybe an AND function??)
    That basically checks the date, and if the date is out 3 weeks from the current date AND order qty = reserve qty, AND A4 has a "Y" then I need A5 to read "OK"
    if it doesn't meet those requirements I would need it to at least say "Look at"

    (would be great if I could determine what the reason for not meeting the requirements is, so basically if the date fell within 3 weeks, it would say "Close" or "Date", and if the qty's don't match it could say "Qty" or "Short", and if it had an "N" value it would say "ASAP Order")
    But that last [part is not necessary, as long as I can determine whether it meets all requirements, or not.


    Thanks!
    -Z

  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,005

    Re: Excel function that produces text if date matches specific range, and 2 cells match

    try

    =IF(AND(A1>TODAY()+21,A2=A3,A4="Y"),"OK","Look at")

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel function that produces text if date matches specific range, and 2 cells match

    Hi,

    I assume you did mean 4 columns and not 4 rows as you indicate.
    In which case

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

    Not sure whether 'out 3 weeks' means earlier than 3 weeks ago or within 3 weeks - but adjust the >=TODAY() as necessary
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. How to sum a range of cells if match a specific date
    By carbayo1 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-02-2016, 07:35 PM
  2. SUMIFS name column matches, along with a specific date range
    By mhewitson15 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2016, 05:00 AM
  3. [SOLVED] Search text in range, if matches, return match value
    By ShakJames in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-13-2016, 06:12 AM
  4. [SOLVED] Email a range of excel cells using VBA produces infinite loop HELP
    By kjam in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-13-2015, 09:58 PM
  5. Replies: 9
    Last Post: 10-08-2015, 01:50 PM
  6. Replies: 2
    Last Post: 08-05-2013, 07:32 PM
  7. VBA - If a range of cells do not contain specific text based on date ranges, then error.
    By Carrie_Smattick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 07:47 PM

Tags for this Thread

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