+ Reply to Thread
Results 1 to 5 of 5

Having trouble with IF statement to return a value if it falls between two dates

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Having trouble with IF statement to return a value if it falls between two dates

    Hello,

    So I have dates in columns AA to BC that are dates by week. And if any of those dates fall between the dates listed in columns N through U, it should return one of the values in columns G, I, K, or M.

    I'm using:
    =IF(AA2=MEDIAN(N3:O3),G3,0)*IF(AA2=MEDIAN(P3:Q3),I3,0)*IF(AA2=MEDIAN(R3:S3),K3,0)*IF(AA2=MEDIAN(T3:U3),M3,0)

    but it's returning a 0 even if the dates falls between one of those ranges. What am I doing wrong? Please help!

    Thanks,
    antcor
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Having trouble with IF statement to return a value if it falls between two dates

    Is this what you want?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Having trouble with IF statement to return a value if it falls between two dates

    In cell AA3, try this:

    Please Login or Register  to view this content.
    Autofill as required.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Registered User
    Join Date
    10-29-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Having trouble with IF statement to return a value if it falls between two dates

    Thanks k64 but that was just displaying a 1 instead of the values from columns G, I, K, M.

    ConneXionLost, you're a lifesaver! That worked perfectly, thanks!

  5. #5
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Having trouble with IF statement to return a value if it falls between two dates

    Oh, I thought that was what you wanted. If you want the values, then ConneXionLost's formula is best.

+ 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] Looking for formula to return a date that falls between 2 dates
    By cobo1981 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-13-2014, 01:12 PM
  2. Replies: 4
    Last Post: 06-28-2013, 08:41 AM
  3. Replies: 3
    Last Post: 10-13-2012, 08:09 PM
  4. [SOLVED] MACRO - IF Statement to evaluate if Date falls BETWEEN to Dates - Please help.
    By tdguy09 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-05-2012, 07:17 PM
  5. [SOLVED] Return value in X if date in Y falls between two dates - Help!
    By nephilim3uk in forum Excel General
    Replies: 4
    Last Post: 07-08-2012, 10:13 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