+ Reply to Thread
Results 1 to 2 of 2

Matching 2 columns of data Pass Fail or Blank

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2000
    Posts
    1

    Matching 2 columns of data Pass Fail or Blank

    I am currently utilizing 3 columns with the following formula in the 3rd column
    =IF(D4=C4,"PASSED","FAILED")
    My problem is that if D4 and C4 have no data entered the E4 column displays PASSED while I need E4 to be blank if D4 and C4 have no data entered. Can you please help? Thanks.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Matching 2 columns of data Pass Fail or Blank

    Hi,

    how about not only checking if they are equal, but also if they have data. COUNTA counts the number of cells with values, so if one of the cells is empty, COUNTA(C4:D4) would be less than 2....

    =IF(COUNTA(C4:D4)=2,IF(D4=C4,"PASSED","FAILED"),"")

    So, Excel first checks if the number of entries in C4 and D4 is 2, if so, it checks if they are equal and assigns the Passed and Failed. If C4 and D4 are not both filled with data, Excel returns a blank.

    HTH
    Last edited by teylyn; 03-05-2009 at 09:53 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