+ Reply to Thread
Results 1 to 4 of 4

Data range in an If Statement

  1. #1
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Data range in an If Statement

    I need to use an if statement to populate a field.

    I have a term date in column I (starting in I2). I need a coverage end date in column J (starting in J2). I want it to return one of two dates based on the date in I.

    If the date in column I is less than or equal to 11/03/2014, then I want the value in Column J to say 10/31/2014.
    If the date in column I is between 11/4/2014 - 11/30/2014, then I want the value in Column J to say 11/30/2014.

    I tried this formula: =IF(I2<="11/3/2014","10/31/2014",(IF(I2>="11/4/2014"and<="11/30/2014","11/30/2014")))
    but it's wrong somewhere. I'm not very good at creating if statements inside of if statement, and I've never done a date range so really not sure what I'm doing, lol.

    Help is appreciated!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Data range in an If Statement

    What if the date in I is Greater than 11/30/2014? Or is that not a possible scenario?

    Try
    =IF(I2<=DATE(2014,11,3),DATE(2014,10,31),DATE(2014,11,30))


    This is assuming the date in I will not be greater than 11/30/2014

  3. #3
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Data range in an If Statement

    Worked perfect. Thanks!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Data range in an If Statement

    You're welcome.

+ 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. If statement to return data in a range
    By jchohan83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2014, 04:37 PM
  2. IF statement for a range of data
    By waterdrinker in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-14-2014, 04:36 PM
  3. If statement based on cell data, if falls in range.
    By finch82 in forum Excel General
    Replies: 3
    Last Post: 10-27-2011, 04:11 PM
  4. limit textbox data to number range with IF statement
    By randyvann in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2008, 04:15 PM
  5. IF statement in Bar Chart Data Range
    By kollerrk in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-09-2008, 09:37 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