+ Reply to Thread
Results 1 to 7 of 7

month between two months

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    month between two months

    Hi all, I'm trying to get TRUE if one month is between other two months, for example. First row (beggining of period) 12, Second row (end of period) 5, third row (number I want to evaluate). Does anybody know a simple formula to sort this out?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: month between two months

    can you upload an example with some possible inputs and outputs?
    Never use Merged Cells in Excel

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: month between two months

    So what numbers would be TRUE? Is it 12, 1, 2, 3, 4 and 5?

    With start month in A2, end month in B2, month to evaluate in C2, use this formula in D2

    =(C2>=A2)+(C2<=B2)+(A2>B2)=2

  4. #4
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: month between two months

    I've highlighted what my aim is...
    Attached Files Attached Files

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: month between two months

    Does my suggested formula work for you? Adapted to your setup it would be this formula in H4 copied across

    =(H3>=H1)+(H3<=H2)+(H1>H2)=2

  6. #6
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: month between two months

    It worked! thanks very much could you please rbriefly explain what it means? why=2?

  7. #7
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Smile Re: month between two months

    thanks it worked!
    Quote Originally Posted by daddylonglegs View Post
    Does my suggested formula work for you? Adapted to your setup it would be this formula in H4 copied across

    =(H3>=H1)+(H3<=H2)+(H1>H2)=2

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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