+ Reply to Thread
Results 1 to 10 of 10

For every row with cells in col A that aren't blank, count how many blank cells in col B

  1. #1
    Registered User
    Join Date
    10-01-2016
    Location
    Leicester
    MS-Off Ver
    2013
    Posts
    5

    For every row with cells in col A that aren't blank, count how many blank cells in col B

    Hi everyone

    I appreciate this will probably be quite a simple solution but for the life of me I can't work it out

    I have a big spreadsheet with a huge list of invoice numbers in col A, then spread across loads of other columns is various details related to said invoices

    I want to have, in one row at the top of the spreadsheet, for every column, a quick check to do the following...

    Check that for every row in which there is an invoice number in col A (i.e. <>""), check how many cells in col B are blank

    The reason being, the spreadsheet is pulling in values from another spreadsheet and isn't protected so there's a risk that cell values could be accidentally deleted which could skew our data

    The reason I want to only check for blank values in rows in which there is an invoice number in column A is that some rows (such as to break up months) will be blank so I don't care if the value in col B on that row is blank

    Hope that makes sense!

    Many thanks
    Joe
    Last edited by supersonicsaint; 10-01-2016 at 12:39 PM.

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

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    Do you mean something like this...

    Data Range
    A
    B
    C
    4
    Blanks
    4
    7
    5
    Invoice #
    Data
    Data
    6
    1
    x
    7
    2
    x
    8
    3
    x
    9
    4
    x
    10
    5
    x
    11
    6
    12
    7
    x
    13
    8
    x
    14
    9
    x
    15
    10
    x
    16
    ------
    ------
    ------


    This formula entered in B4 and copied across:

    =COUNTIFS($A$6:$A$15,"<>",B6:B15,"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    10-01-2016
    Location
    Leicester
    MS-Off Ver
    2013
    Posts
    5

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    Hi Tony

    Thanks very much that's a great start

    Now how could I go about amending this so that it only returns a count of cells that are completely blank i.e. do not contain any formulas?

    Joe

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

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    Does that mean some cells contain formulas that return formula blanks "" and some cells are empty (do not contain formulas) ?

    So, which of these types of cells do you want to count?

  5. #5
    Registered User
    Join Date
    10-01-2016
    Location
    Leicester
    MS-Off Ver
    2013
    Posts
    5

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    Yes some will contain formulas which return blanks - such as "date paid" will be blank if the invoice is unpaid

    There is a possibility some might have the formulas deleted altogether due to human error

    Because the first instance is to be expected I'm not interested in a count of these (I'm sorry I wasn't clear in my original message)

    Because there are thousands of rows of invoices and I cannot run the risk of deleted formulas in cells, I want one row at the top with a check in each column counting up any such instances

    Cheers

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

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    This will count EMPTY cells...

    =SUMPRODUCT(--ISBLANK(B6:B15))

  7. #7
    Registered User
    Join Date
    10-01-2016
    Location
    Leicester
    MS-Off Ver
    2013
    Posts
    5

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    Thank you but how do I tie this into the original formula?

    That will count blank cells in the column B but I need to only count blank cells in column B if there is an invoice number in that row on column A

    As I say I expect some to be blank because there aren't necessary invoices in every row such as dividers in between periods

    Cheers
    Joe

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

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    There's a difference between "blank" and empty!

    =SUMPRODUCT(--(A6:A15<>""),--ISBLANK(B6:B15))

  9. #9
    Registered User
    Join Date
    10-01-2016
    Location
    Leicester
    MS-Off Ver
    2013
    Posts
    5

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    That's the one!

    Thanks for all the help

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

    Re: For every row with cells in col A that aren't blank, count how many blank cells in col

    You're welcome. 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. Check particular blank cells in a row based on input in D column
    By weareallstardust in forum Excel General
    Replies: 1
    Last Post: 09-24-2014, 09:51 AM
  2. [SOLVED] Macro to fill blank cells in column A based on non-blank cells
    By ktalamantez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 02:47 PM
  3. Replies: 4
    Last Post: 06-24-2013, 07:17 AM
  4. Replies: 0
    Last Post: 03-05-2013, 09:22 AM
  5. Replies: 2
    Last Post: 10-04-2012, 03:19 PM
  6. Replies: 4
    Last Post: 08-29-2012, 02:45 PM
  7. How to check cell isnt blank upon saving or closing
    By jchamber00 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-29-2012, 04:42 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