+ Reply to Thread
Results 1 to 4 of 4

Count If/Or and Exclude blank cells

  1. #1
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Count If/Or and Exclude blank cells

    Okay - what I'm looking for is a formula to count the total values in column C starting at row 6 for all values with a building status of "UC".

    This is what I came up with:

    =SUM(IF(ISNUMBER(MATCH($A$6:$A$26,{"UC","UR"},0)),$C$6:$C$26))/COUNT(IF(ISNUMBER(MATCH($A$6:$A$26,{"UC","UR"},0)),$C$6:$C$26<>"",C6:C26)>0,Table1[Average asking rent p.s.f. (FSG)])

    The last part of the formula is calculating the total number of values in column C correctly (13) but it's not accurately looking at column A for UC building status.. instead it's calculating all.

    Ultimately, it should average column C as long as it's a UC OR UR building.

    Thanks so much and look forward to see what you come up with!

    Count If Or Exclude Blank.xlsx

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Count If/Or and Exclude blank cells

    Try

    =AVERAGE(IF(Table1[Building status]={"UC","UR"},IF(Table1[Average asking rent p.s.f. (FSG)]>0,Table1[Average asking rent p.s.f. (FSG)],""),""))

    Enter with Ctrl+Shift+Enter

  3. #3
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Re: Count If/Or and Exclude blank cells

    Perfect - thank you so much!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Count If/Or and Exclude blank cells

    Thanks you for the feedback and rep.

    If your problem has been addressed, can you mark thread as solved ("Thread Tools" at top of first post)

+ 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] Count non blank cell but exclude cells that only have a space using VBA
    By Seeki in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-22-2016, 09:56 PM
  2. [SOLVED] VBA code to exclude cells that are blank
    By msmithy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2014, 05:54 AM
  3. How do I exclude blank cells when using conditional formatting
    By ledgerly in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-23-2013, 03:57 PM
  4. [SOLVED] Count entries with formulas, exclude blank values
    By JO505 in forum Excel General
    Replies: 4
    Last Post: 03-08-2013, 08:16 PM
  5. Sum multiple cells, but exclude blank ones
    By GorillaBoze in forum Excel General
    Replies: 1
    Last Post: 12-23-2010, 01:37 PM
  6. Counting data in non blank cells and exclude certain data from the count
    By JohnG73 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2007, 04:08 PM
  7. [SOLVED] Exclude blank cells from a range?
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2005, 10:05 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