+ Reply to Thread
Results 1 to 3 of 3

Formula result shows "1" when cell it refers to is blank

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    Victoria, Australia
    MS-Off Ver
    Excel 2010
    Posts
    48

    Formula result shows "1" when cell it refers to is blank

    I'm trying to make a helper column of month number(Col F) to then make a column of monthly totals (Col G) using a formula like so =MONTH(LISA_INCOME[[#This Row],[DATE]])

    Problem is that the column of dates does not have a date in each cell of that column, if there's a blank date the month number formula result shows "1"

    Is there a way to adjust the above formula so that blank dates show blank months or even zero months so I can then maybe even use conditional formatting to hide the zero/blanks in the resulting month number column?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Formula result shows "1" when cell it refers to is blank

    Maybe this...
    =if(A1="","",MONTH(LISA_INCOME[[#This Row],[DATE]]))

    (I used A1, you would use your own cell ref)

    I would question why you need to extract the month number for this though, there may be other ways?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula result shows "1" when cell it refers to is blank

    Just some FYI...

    An empty cell evaluates to 0.

    0 is the date serial number for the date 1/0/1900 (m/d/yyyy). You didn't know there was a day 0? Well, there is in Excel!

    So, 0 = month 1 (for January).

    =MONTH(empty_cell) = 1
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Create "IF formula" that refers to a cell that contains a formula?
    By motospeedo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2014, 03:44 PM
  2. World Cup "OR" formula shows TRUE and FALSE to same result?
    By jbelliot in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-30-2014, 06:49 AM
  3. I WANT REDUCE THIS FORMULA AND i want hide if result shows "0"(zero)
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-27-2013, 07:28 PM
  4. solution for the blank cell using the IF function
    By ragnaedge in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 11:03 AM
  5. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  6. [SOLVED] Sum formula result shows "#N/A"
    By Dinesh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-19-2006, 11:10 AM
  7. blank cell shows as a "0" in a formula
    By rjr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-07-2006, 12:50 AM

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