+ Reply to Thread
Results 1 to 5 of 5

Why would this formula produce this wrong answer

  1. #1
    Forum Contributor
    Join Date
    01-19-2013
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 365 2016
    Posts
    214

    Why would this formula produce this wrong answer

    Please Login or Register  to view this content.
    = "Jan"

    It's February, my cpu knows it's February, and so does my Excel...why would it say January?

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

    Re: Why would this formula produce this wrong answer

    Month() returns a number 1 to 12, which, as dates, represent 1 through 12 Jan 1900.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Why would this formula produce this wrong answer

    =MONTH(TODAY()) gives the result 2 so TEXT function gives you the month of day 2 in the excel calendar which is 2 Jan 1900, so you get Jan. For your purposes you don't need MONTH function - use this version

    =TEXT(TODAY(),"mmm")
    Audere est facere

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why would this formula produce this wrong answer

    Because it should be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Your formula is trying to evaluate the month of a date serial number of 2, which is the 2nd January 1900


    Edit: wow, the forum is fast tonight!!
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  5. #5
    Registered User
    Join Date
    01-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Why would this formula produce this wrong answer

    OllyXLS has the best answer.

    I've had to do something similar to what you're asking, here's how I solved it before. Much less clean and cool than OllyXLS.

    A1:A12 has the numbers 1 through 12, and then B1:B12 has the months Jan, Feb, Mar, etc. It should look like this:

    1 Jan
    2 Feb
    3 Mar
    4 Apr
    5 May
    6 Jun
    7 Jul
    8 Aug
    9 Sep
    10 Oct
    11 Nov
    12 Dec


    Then in C1, use this formula:
    =VLOOKUP(MONTH(TODAY()),A1:B12,2,FALSE)

    This formula vlookups the "month calendar" in columns A and B and will return the current month of Today.
    http://answernothing.com

+ 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. right answer has value 1,wrong answer has value 0
    By zeroist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-10-2012, 10:45 AM
  2. Formula Dragging, Wrong Answer
    By pbateman56 in forum Excel General
    Replies: 1
    Last Post: 04-16-2012, 04:56 PM
  3. [SOLVED] Fill down produces correct formula but wrong answer
    By Jim at SDSU in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2006, 03:10 PM
  4. [SOLVED] Formula correct, answer wrong
    By TJAC in forum Excel General
    Replies: 2
    Last Post: 01-03-2006, 02:20 PM
  5. Wrong answer after using the payment formula in excel
    By punkyh in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 04-28-2005, 03:06 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