+ Reply to Thread
Results 1 to 3 of 3

Left and If functions with a date range

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Left and If functions with a date range

    I want to be able to take the left 3 digits from the column B2 only if the date in A2 falls between the specified range. Otherwise I want it to display "-". I can't seem to wrap my mind around this today...HELP!

    The formula found in C2 is:

    =LEFT(IF(A2,">="&DATE(2011,10,1))-IF(A2,">"&DATE(2011,10,31))*B2,3)

    Thanks in advance for help in this issue!

    -EW
    Last edited by wagnered; 10-31-2011 at 02:04 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Left and If functions with a date range

    Hi EW, perhaps try:

    =IF(AND(A2>=DATE(2011,10,1),A2<=DATE(2011,10,31)),LEFT(B2,3),"-")

    Hope that helps!

  3. #3
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Left and If functions with a date range

    Nailed it! Thank you!

    Re: Left and If functions with a date range

    --------------------------------------------------------------------------------

    Hi EW, perhaps try:

    =IF(AND(A2>=DATE(2011,10,1),A2<=DATE(2011,10,31)),LEFT(B2,3),"-")

    Hope that helps!
    __________________
    - Paul

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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