searching in visual basic

G

gatech steph

I am fairly new to writing in visual basic and I need some help. I have 3
columns of data to "side one" of a worksheet and then a seperate 3 columns on
"side two" of the same worksheet. The two sides are simply seperated by a
couple columns. I need to compare the two sides to find matches. I do not
need it to find matches on the same side of data just from one side to the
other. If there are matches I need for the cell to change to an orange
background.
 
D

Don Guillett

You can just use conditional formatting
format>conditional format>formula is>type in something like this>format as
desired.
=IF(MATCH(F7,$A$7:$C$7),TRUE)
 
T

Tom Ogilvy

Use Conditional Formatting found under the format menu (in xl2003 and
earlier).

for the conditional formatting formula
Use countif to determine if there is a match. So this would be the basis:

=countif($AA:$AC,A1)

Look in the conditional formatting sections at Debra Dalgleish's site.

http://www.contextures.com/tiptech.html
 
T

Tom Ogilvy

To the Original Poster,
Just to add that Match works with a single column or single row. If by 3
columns of data you mean you have multiple rows, Match may not be the best
choice.
 
G

gatech steph

I don't think this will work for what I am trying to do. Is there a way to
post a picture so I can show a screen shot of what I am trying to explain??
 
D

Don Guillett

To copy the format down for other rows, change to
=IF(MATCH(F7,$A7:$C7),TRUE)
Send your workbook to my address below if you like along with clear
explanations of what you want.
 
G

gatech steph

Ok that some what worked for what I need but I have some blank cells in
between sets of rows that are being considered as match. Is there a way to
avoid this becuase I do not want these cells to be highlighted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top