+ Reply to Thread
Results 1 to 4 of 4

Formula to determine whether the month of date falls within a variable season.

  1. #1
    Registered User
    Join Date
    07-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    59

    Formula to determine whether the month of date falls within a variable season.

    Hi all,

    I would be most grateful if someone could help me with this.

    I have a date in cell A1, say 31stMay 2014

    In cells A2 and A3 I have numbers representing a month of the year, 1 for Jan, 2 for Feb etc which represent the start and end of a season.

    I am looking for a formula that will determine whether my date in A1 falls within this season. The season start and end are variables that I want to change. The season could be something like August to March which seems to be making a < or > formula problematic.

    Many TIA,

    Andrew

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

    Re: Formula to determine whether the month of date falls within a variable season.

    I'm sure there's lots of ways. Here's a couple that spring to mind:

    =MEDIAN(MONTH(A1),A2:A3)=MONTH(A1)

    or

    =ISNUMBER(MATCH(MONTH(A1),A2:A3,0))

    or

    =AND(MONTH(A1)>=A2,MONTH(A1)<=A3)


    This assumes the date has to fall between the first of the first month and the end of the second month. Does this work for you or are there deeper specifications?
    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!

  3. #3
    Registered User
    Join Date
    07-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Formula to determine whether the month of date falls within a variable season.

    Thanks Daff,

    Unfortunately these don't quite do what I wanted - perhaps I didn't explain very clearly.

    The season might be August to March and I want to determine if a date, say 31st May 2014 falls within this season. The formulas you suggested all come out FALSE for all dates.

    However, thanks for your input.

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

    Re: Formula to determine whether the month of date falls within a variable season.

    I see what you mean. You may need to indicate a year for your months.

    While it would be quite simple to detect if A2<A3, and then have A2 be a month of prior year, that would always assume the months are rolled back and never forward.


    Are you able to attach a spreadsheet with a sample of your data, so I can have a better idea of your formatting and layout?

    (attach by clicking Go Advanced, Manage Attachments)

+ 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. COUNTIF the date falls within a month
    By Patty McJorst in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-13-2013, 10:43 AM
  2. [SOLVED] Determine date based on request date meanwhile falls on particular days
    By Hikari in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-18-2013, 09:37 AM
  3. [SOLVED] Testing whether a date falls within a certain month.
    By jngu007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-09-2012, 06:53 PM
  4. Function to show what season a date falls in.
    By HammerTime in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-22-2009, 09:23 PM
  5. [SOLVED] Formula to determine whether number falls within range??
    By Cat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2005, 10:05 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