Computing.Net > Forums > Office Software > If statement

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

If statement

Reply to Message Icon

Name: JAH
Date: October 19, 2009 at 14:14:33 Pacific
OS: Windows XP
Product: Microsoft Excel 2003 (full product)
Subcategory: Microsoft Office
Comment:

I would like to write an if statement for the following. I have two columns of names. One column has 169 names and the other has 409. I need to make sure that the column with the 169 names, that those names are in the column which contains the names of the 409 people.

Any advice?



Sponsored Link
Ads by Google

Response Number 1
Name: Humar
Date: October 19, 2009 at 14:27:46 Pacific
Reply:

Hi,

If your short list of names is in column A, starting at A1
and
your long list of names is in column D,
put this formula in Cell B1:
=IF(ISNA(VLOOKUP(A1,$D$1:$D$408,1,FALSE)),"Missing","")
Note the $ signs

Then drag the formula down the 169 rows required,

Alongside any names in column A that do not appear in column D you will get the word 'missing'

Vlookup returns the #NA error if it does not find a match.
Using the ISNA function returns TRUE if Vlookup can't find a match and returns #NA
The if function returns "Missing" if ISNA returns True (and "" if False, i.e. if Vlookup found a match).

Regards


0

Response Number 2
Name: DerbyDad03
Date: October 19, 2009 at 15:04:30 Pacific
Reply:

Or, similar to Humar's suggestion, you could select the 169 names that start in A1, and use:

Format...Conditional Formatting...Formula Is...

=IF(ISNA(VLOOKUP(A1,$D$1:$D$408,1,0)),TRUE,FALSE)

and choose a Format, such as Pattern...Yellow.

Click OK

Any name that isn't found in D1:D408 will take on the Format chosen.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


.xls file opening problem... removing watermarks from ...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: If statement

Excel IF statement www.computing.net/answers/office/excel-if-statement/5872.html

Excel nested IF statements www.computing.net/answers/office/excel-nested-if-statements/4980.html

Microsoft Excel IF Statement www.computing.net/answers/office/microsoft-excel-if-statement/4444.html