+ Reply to Thread
Results 1 to 10 of 10

IF Statement that populates a Month based off of specific Date Ranges

  1. #1
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    IF Statement that populates a Month based off of specific Date Ranges

    I have two fields, one field pulls in the date as 9/11/2014 and I want my other field to look at that cell and determine if it should be AUG, SEP, or OCT. I was thinking an IF Statement but not sure.

    Thanks,

    ~Chris

  2. #2
    Registered User
    Join Date
    01-15-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: IF Statement that populates a Month based off of specific Date Ranges

    Not sure on what you are trying to achieve, if you are talking about making the 9/11/14 show as a month in another cell =text(a1,"mmm")

  3. #3
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Re: IF Statement that populates a Month based off of specific Date Ranges

    Sorry, If in cell A1 its says 9/11/2014 then I want cell B1 to say SEP (September) However, because the way my month closes at work the first 5 to 8 days of the month depending on the days the fall on are still considered the previous month so in A1 if it says 9/2/2014 I would want cell B1 to return AUG (August). What I need is a way to have the formula work for any month that I specify in the range and I know it will most likely be a larger formula but I am just wanting to test 1 month and see how it works. I was thinking =IF(A1< but after that I get stuck.

  4. #4
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: IF Statement that populates a Month based off of specific Date Ranges

    Is the first day of the work-month the first Monday? Or, are you working with a 4-4-5 quarterly calender?

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: IF Statement that populates a Month based off of specific Date Ranges

    I am not a Guru but will contribute as much as I can since this forum has helped me through troubling times. This is what I came up with: =IF(NUMBERVALUE(TEXT(A1,"dd"))-7<0,TEXT(DATE(YEAR(A1),MONTH(A1)-1,DAY(A1)),"mmm"),TEXT(A1,"mmm"))

    My logics behind this is I am accounting for the days lesser 7. If the value is less then 0 means it puts the day back into the previous month. Then I make the month show as august (subtract 1 from the month). I have not tested this solution thoroughly but I hope this can spark something. Back to work lol.

  6. #6
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Re: IF Statement that populates a Month based off of specific Date Ranges


    Is the first day of the work-month the first Monday? Or, are you working with a 4-4-5 quarterly calender?


    It works off of the first of each month to the first full week and ends on the Friday. So if September 1st falls on a Wednesday then the August would not close until the following weeks Friday but if the first falls on a Monday then it would close that Friday so it is really unique to that specific calendar year and how the 1st falls.

  7. #7
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: IF Statement that populates a Month based off of specific Date Ranges

    I may have something...

    See if the attached works for your situation.

    Hope this helps.

    -Z
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Re: IF Statement that populates a Month based off of specific Date Ranges

    That's Great I never even thought of using a table. Thank you!

  9. #9
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Re: IF Statement that populates a Month based off of specific Date Ranges

    That formula works perfect! thanks for the help.

  10. #10
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: IF Statement that populates a Month based off of specific Date Ranges

    Forget my last post. Try this one.
    It's an adaptation of Beany Baby's formula, but modified to account for mid-week changes.

    Hope this helps.

    -Z
    Attached Files Attached Files

+ 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: 3
    Last Post: 07-08-2014, 11:49 AM
  2. [SOLVED] open worksheet based on month to specific sheet named after month and hide rest
    By ianmcw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2014, 10:19 PM
  3. VBA - If a range of cells do not contain specific text based on date ranges, then error.
    By Carrie_Smattick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 07:47 PM
  4. Formula to Show Accounting Month based on a specific date range
    By michelle saluta in forum Excel General
    Replies: 1
    Last Post: 09-23-2010, 02:17 PM
  5. Replies: 10
    Last Post: 02-22-2009, 02:44 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