+ Reply to Thread
Results 1 to 3 of 3

Returning different values if cell falls between a certain date range

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2015
    Location
    Indiana
    MS-Off Ver
    2010
    Posts
    2

    Returning different values if cell falls between a certain date range

    Hi everyone!

    I've used hundreds of these threads to help me solve errors before, but have never really posted one myself. Unfortunately, this particular issue I am having I've been unable to work out on my own no matter how hard I try, so I'm hoping this means you guys can help me out

    Here is the issue I'm having:

    I have a spreadsheet with a set of dates. My goal is to be able to have a separate column with a formula that looks at that date and throws back a value based on when the date in question falls between a certain time frame. More specifically, month.

    Capture.PNG

    In the above image, I want a formula to put in the "Month" column that will function like this:
    "If START DATE falls on a day in January, return "JANUARY" to the cell in the month field. If START DATE falls on a day in February, return "FEBRUARY" to the cell in the month field. Etc."
    So it would essentially have 12 different possible values it could return (one for each month).

    The closest I've been able to find is this: =IF(AND(A2>=DATE(2015,1,1),A2<=DATE(2015,1,31)),"January",""), which functions perfectly fine to return a single value, but I am looking for something that will give me multiple values based on different criteria. I've tried tinkering with the above formula to add in different values, but I just can't seem to find what I'm looking for.

    Does anyone know if this is possible? Is it simply too large a function for the formula to handle? Any and all help would be greatly appreciated as I cam pulling my hair out trying to figure it out

    Thanks so much!!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Returning different values if cell falls between a certain date range

    One way

    =CHOOSE(MONTH(A2), "January","February","March","April", "May","June", "July", "August","September", "October","November", "December")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-23-2015
    Location
    Indiana
    MS-Off Ver
    2010
    Posts
    2

    Re: Returning different values if cell falls between a certain date range

    Quote Originally Posted by ChemistB View Post
    One way

    =CHOOSE(MONTH(A2), "January","February","March","April", "May","June", "July", "August","September", "October","November", "December")
    THANK YOU SO MUCH!!!! I absolutely knew there had to be a simpler way to do that, I just couldn't for the life of me figure it out. PERFECT! Thanks so much ChemistB!

+ 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. Replies: 7
    Last Post: 07-14-2017, 12:04 PM
  2. [SOLVED] Returning a text result when cell value falls within a range
    By oatsiebfc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-17-2014, 12:07 PM
  3. [SOLVED] Returning a date from a range if date falls between two other dates
    By sdavison in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2013, 03:59 AM
  4. [SOLVED] Return cell value if date falls within specified range
    By coza in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-10-2013, 03:58 PM
  5. [SOLVED] Returning a value from a number that falls BETWEEN 2 other values
    By Franky141 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 12:44 PM
  6. Mark cell if location matches and date falls between date range
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2012, 07:54 PM
  7. Replies: 10
    Last Post: 05-13-2012, 07:43 PM
  8. [SOLVED] update cell only if now() falls in a given date range
    By treyn1292 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-16-2006, 05:00 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