+ Reply to Thread
Results 1 to 16 of 16

NULL (blank) problem

Hybrid View

  1. #1
    Registered User
    Join Date
    02-24-2013
    Location
    Dallas, TC
    MS-Off Ver
    Excel 2007
    Posts
    30

    NULL (blank) problem

    Hello everyone;
    In the attached spreadsheet, Row-3 gets it values from Row-2 (it's a cumulative total). I need some assistance for a formula statement like this;

    If F2, G2....is NULL, then F3,G3....is also NULL
    If F2, G2...is a number (including 0), then continue with cumulative total.

    Note that row-2 is manually entered. Row 3 relies on row-2 to continue with its total.

    Can this be done? Will appreciate any help folks!

    Thanks
    Attached Files Attached Files
    Last edited by amt7565; 02-08-2014 at 09:08 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    Try:

    B3:
    Formula: copy to clipboard
    =IF(COUNTA(B2:C2)=0,"",N(A3)+N(B2))



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    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
    53,048

    Re: NULL (blank) problem

    This is how it would work for B...
    =IF(B2="","",B2)

    you can use that same principal for teh others...
    =IF($B3="","",B3+C2)
    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

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    @Ford:
    Formula: copy to clipboard
    =IF($B3="","",B3+C2)
    ???

  5. #5
    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
    53,048

    Re: NULL (blank) problem

    The formula in C3=B3+C2, so If B3 is null....

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    But B3 is absolute; $B3

  7. #7
    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
    53,048

    Re: NULL (blank) problem

    Just the column. It looks like that can be copied across...
    =B3+C2
    =C3+D2
    =D3+E2
    So that can be just copied across, with B fixed

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    But the check for blank will always be against $B3 ...

    Maybe see the attached updated workbook.

    Regards, TMS
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-24-2013
    Location
    Dallas, TC
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: NULL (blank) problem

    Awesome! This works just like you suggested. Thank you TMS and Ford.

    This now brings me to my end case- which is a graph.
    In the attached spreadsheet, I am attempting to graph this very solution. The red graph as you can see treats the NULL like a '0' and hence plots it ending in '0'. This is the row-3 that holds the formulas we entered.

    The blue graph is from row-2 and does not contain the formulas. It however treats the null as a null, not '0'.

    I want the red graph to look like the blue one. i.e; Do not plot '0'. It should just hang.

    Is this possible?

    Thanks
    Attached Files Attached Files

  10. #10
    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
    53,048

    Re: NULL (blank) problem

    Trevor...But the check for blank will always be against $B3...
    that is correct, if B3 is blank, they will all be blank

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    Try:

    Formula: copy to clipboard
    =IF(COUNTA(B2:C2)=0,NA(),N(A3)+N(B2))



    Regards, TMS

  12. #12
    Registered User
    Join Date
    02-24-2013
    Location
    Dallas, TC
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: NULL (blank) problem

    I was able to solve my problems.
    Thanks everyone for your generous help.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    @Ford: I read this:

    If F2, G2....is NULL, then F3,G3....is also NULL
    If F2, G2...is a number (including 0), then continue with cumulative total.
    as meaning if 2 cells in a row are blank, the accumulator row also remains blank, not continue as a flat line

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    I was able to solve my problems.
    Can you share with us what you did?

  15. #15
    Registered User
    Join Date
    02-24-2013
    Location
    Dallas, TC
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: NULL (blank) problem

    Quote Originally Posted by TMShucks View Post
    Can you share with us what you did?
    TMS, I used "=IF(N21="",#N/A,M22+N21)"

    #N/A forced the graph to not plot '0'.

    The rest is based on your recommendation.
    Thanks!

    AMT

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,122

    Re: NULL (blank) problem

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Make 0 Value Cells = Blank / Null
    By jboyd12 in forum Excel General
    Replies: 7
    Last Post: 07-10-2012, 12:57 PM
  2. Replies: 1
    Last Post: 11-13-2011, 04:03 AM
  3. Blank cells are getting populated as null
    By Banerjee in forum Excel General
    Replies: 1
    Last Post: 05-29-2009, 04:51 AM
  4. Blank Cells But Not Null Values
    By jtwork in forum Excel General
    Replies: 1
    Last Post: 04-17-2007, 08:08 AM
  5. How to set cell value to null/blank
    By Tallukka in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-18-2005, 12:28 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