+ Reply to Thread
Results 1 to 31 of 31

Testing for Blank Cells

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Testing for Blank Cells

    In E1 and copy down,

    =COUNTA(A1:B1)*COUNTA(C1:D1)

    The cells with non-zero results are the ones to be copied. Does that work for you?
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Registered User
    Join Date
    10-01-2009
    Location
    Santa Maria, CA
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Testing for Blank Cells

    I'm don't think this works. The possible combinations to copy the complete record as as follows: A1 and C1 combined must not be blank; or A1 and D1 combined must not be blank; or B1 and C1 combined must not be blank; or B1 and D1 combined must not be blank. If one cell of any of the four combinations is blank, then I do not want to copy the record. Thanks!

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Testing for Blank Cells

    This:
    A1 and C1 combined must not be blank; or
    A1 and D1 combined must not be blank; or
    B1 and C1 combined must not be blank; or
    B1 and D1 combined must not be blank.
    ... does not gibe with this:
    if there is data in row 1, column A and data in row 1, Column C or row 1 column D, then copy ...
    if there is data in row 1 column B and data in column C or column [D], then copy ...
    Either is possible; which do you want?
    Last edited by shg; 10-02-2009 at 12:37 PM.

  4. #4
    Registered User
    Join Date
    10-01-2009
    Location
    Santa Maria, CA
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Testing for Blank Cells

    Shg,

    I need to do both. Thanks

  5. #5
    Registered User
    Join Date
    09-17-2009
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    9

    Question Re: Testing for Blank Cells

    What end result do you want?

    If there are values in both A1 & C1, etc... do you want a single value placed in cell M10 that references that fact? In otherwords... Do you want M10 to say...
    "A1 & C1", or "234A & 4T41", or "2 cells not blank", or what?

    And if that's the case, are you addressing each row separately? In otherwords... Will you want to display row 2's results in M11 ?

    Or are you just trying to post the table, without the blanks? In otherwords... A1:D7 would become M10:P16, except it is displayed like this...
    234A N333 4T41 7657
    11C2 321 3T27
    L954 989
    56D1 297-1
    87E3 P199
    D992
    Z222 3391

    Just trying to help...

  6. #6
    Registered User
    Join Date
    10-01-2009
    Location
    Santa Maria, CA
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Testing for Blank Cells

    MSY12,

    Thanks for your reply. I have a spreadsheet with approximately 12,000 rows of data. It's being used as a database. If certain cells of data of the same row have data and are not blank, I want to copy the entire row of data to another spreadsheet. I am having difficulty testing the cells of data which maybe numeric or alpha numeric. The possible combinations of cells are as follows:

    A1 and C1 combined must not be blank; or
    A1 and D1 combined must not be blank; or
    B1 and C1 combined must not be blank; or
    B1 and D1 combined must not be blank.

    Thanks!

  7. #7
    Registered User
    Join Date
    10-01-2009
    Location
    Santa Maria, CA
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Testing for Blank Cells

    Shg,

    I'm confused. I re-read your prior reply and realize I may not have replied correctly to you. I am interested in the following only:

    A1 and C1 combined must not be blank; or
    A1 and D1 combined must not be blank; or
    B1 and C1 combined must not be blank; or
    B1 and D1 combined must not be blank.

    I need to be able to test for these 4 possible combinations. If any one of these combinations is not a blank then I need to copy this entire row of data. My spreadsheet has over 13,000 rows of data with 17 columns/cells per row.

    Thanks

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Testing for Blank Cells

    The other condition is =(COUNTA(A3:B3)=2) + (COUNTA(C3:D3)=2)

    The truth tables look like this:
    Clip2.jpg
    Last edited by shg; 10-02-2009 at 02:40 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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