+ Reply to Thread
Results 1 to 5 of 5

Date Ranges and IF statements

  1. #1
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    100

    Date Ranges and IF statements

    Hello --

    On a worksheet, in column E is a hire date and column F is a terminated date (row 2). Then columns G-BI are month/years.

    I want Row2 Column G-BI to answer the question if the individual as an employee in a given month/year with a Y or blank.

    How would I do this?

    Attached is an example of how the layout and what I'd want it to look like.
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Date Ranges and IF statements

    G2=IF(OR(G$1<DATE(RIGHT($E2,4),LEFT($E2,FIND("/",$E2)-1),1),G$1>IF($F2="",10^10,DATE(RIGHT($F2,4),LEFT($F2,FIND("/",$F2)-1),1))),"","Y")

    Try this and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Date Ranges and IF statements

    G2:

    Please Login or Register  to view this content.
    Copy down and across

    Edit: This is a bad answer.
    Last edited by daffodil11; 03-30-2015 at 12:37 PM.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: Date Ranges and IF statements

    This seems to be working! I really appreciate your answer and help!!!

  5. #5
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Date Ranges and IF statements

    Another option.
    AB2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

+ 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] Confusing Logic Question Regarding IF statements and date ranges
    By rbac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2013, 03:45 PM
  2. Cell ranges and IF statements
    By stefan82 in forum Excel General
    Replies: 4
    Last Post: 04-24-2012, 07:00 PM
  3. If statements for ranges
    By garopro in forum Excel General
    Replies: 11
    Last Post: 09-29-2011, 11:33 AM
  4. Multiple If then Statements with ranges
    By cs1014 in forum Excel General
    Replies: 2
    Last Post: 07-29-2009, 12:21 PM
  5. IF statements and ranges
    By Idz21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2006, 05:22 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