Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing numbers

Status
Not open for further replies.

copeco

Technical User
Joined
Jun 11, 2002
Messages
31
Location
US
Good morning. I have a column(B) of numbers (with extra info next to each number)106048 r89989 bhk227t. In column(A), I will key numbers that may match column (B)numbers. If column (A)match any in colulmn (B) then I want to change background colors in column (A) and column (B)(with the extra info.e.g. col A col B col C col D
106048 107030 r45644 bhk239b
107090 106048 r81669 bhk137c
in example above: col A (106048)cell, col B,C,D (106048,r81669,bhk137c)cell would all change background colors.
thanks much...copeco
 
Copeco,

Courtesy of Chip Pearson
bookmark this page--great stuff!--->
Highlighting Duplicate Entries

Our first task is to highlight the cells in Range1 (in your case "Range1" is your column A-D range) that are duplicates. We use Excel's Conditional
Formatting tool to accomplish this. First, highlight the entire Range. Then, select the
Conditional Formatting tool from the Format menu: Format->Conditional Formatting.
Change the "Cell Value Is" option to "Formula Is" and enter the following formula in the
formula text box:

=IF(COUNTIF(Range1, A2)>1,TRUE,FALSE)

Where A2 is the first cell in Range1. Then, click the Format button and select the font or
color you want your cell formatted with. Finally, click OK. Duplicate entries in Range1 will be
formatted as you selected. For example, if "Able" occurs twice in Range1, both
occurrences of "Able" will appear highlighted.

NMC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top