+ Reply to Thread
Results 1 to 7 of 7

month function

  1. #1
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Angry month function

    Hello everyone,

    Here is my issue and I'm sure the answer is pretty simple but it's driving me crazy. I have a date in cell A7 (6/30/2010 for example) and in cell A8 I want to return the month of that specific date (Jun) so I use the formula =month(A7) and it returns a value of 6. That makes sense since June is the 6th month but when I change the format under "custom" to "mmm" in hopes of getting Jun, it always returns Jan. If I mess around with some other date formats it looks like the 6 is being read as 1/6/1900 and that's why I keep getting Jan instead of Jun. Is there a way to get it to return Jun as the month of that specific date instead of Jan? Much thanks to anyone who can help me out.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: month function

    The number 6 is Jan 6, 1900.

    =A7 and format as "mmm"
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: month function

    Simple enough, but is that cell going to work properly since it is only formatted differently because I will be doing vlookups, countifs, and other things with it?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: month function

    I might be able to answer that if I knew what you were doing ...

  5. #5
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: month function

    Well one thing I will be doing is counting the number of records in a separate sheet that occurred during that specific month so I want to use that cell as a reference in the equation. Does that help?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: month function

    For that you need the actual date, and, for example, a COUNTIFS formula:

    =COUNTIFS(A1:A24, ">=01 Jun 2010", A1:A24, "<=30 Jun 2010")

  7. #7
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: month function

    That's what I was trying to avoid because what I'm actually doing is a lot more complicated that a single countifs statement... Oh well I guess I will have to figure out some other way to do it. Thanks for the help.

+ 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