+ Reply to Thread
Results 1 to 8 of 8

COUNTIF and IF statements to count non-blank cells only

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    COUNTIF and IF statements to count non-blank cells only

    Hi I would like the following formulas below to only count the cells that have a value. If there is no value, to return a blank cell:

    =E14*F14
    =IF(G14>12,"H",(IF(G14>4,"M","L")))
    =COUNTIF(E14:AZ88, "L")

    Any help is greatly appreciated.

    Thank you.

  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,929

    Re: COUNTIF and IF statements to count non-blank cells only

    You only have 1 formula that is counting anything there, so perhaps...
    =if(COUNTIF(E14:AZ88, "L")<1,"",COUNTIF(E14:AZ88, "L")

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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 Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF and IF statements to count non-blank cells only

    Quote Originally Posted by FDibbins View Post
    You only have 1 formula that is counting anything there, so perhaps...
    =if(COUNTIF(E14:AZ88, "L")<1,"",COUNTIF(E14:AZ88, "L")

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    I have attached a sample.
    Attached Files Attached Files

  4. #4
    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,929

    Re: COUNTIF and IF statements to count non-blank cells only

    Thanks. Where do you want these, and what is your expected outcome?

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF and IF statements to count non-blank cells only

    Quote Originally Posted by FDibbins View Post
    Thanks. Where do you want these, and what is your expected outcome?
    Thank you, in cell H14. I can copy the formula to the rest of the cells.

    I used your formula above for the other cells.

  6. #6
    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,929

    Re: COUNTIF and IF statements to count non-blank cells only

    Will this work for you?
    =IF(G14=0,"",IF(G14>12,"H",IF(G14>4,"M","L")))

  7. #7
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF and IF statements to count non-blank cells only

    Quote Originally Posted by FDibbins View Post
    Will this work for you?
    =IF(G14=0,"",IF(G14>12,"H",IF(G14>4,"M","L")))
    That is perfect! THANK YOU!

  8. #8
    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,929

    Re: COUNTIF and IF statements to count non-blank cells only

    Happy to help, thanks for the feedback

+ 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. [SOLVED] Countif if counting 65536 cells (excel 2003) with count if blank
    By Sc0tt1e in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-06-2013, 11:48 AM
  2. [SOLVED] Long Countif statement Not to Count Blank Cells
    By Jiptastic in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-30-2013, 01:44 PM
  3. COUNTIF Issues count blank cells among existing data
    By chrispulliam in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-21-2010, 01:52 AM
  4. Count blank cells within a range not including fully blank rows
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-16-2008, 09:43 AM
  5. How do I use countif to count values excluding blank cells
    By Glenda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2006, 12:30 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