compare columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am trying to create a code in Vba to compare the text of 2 columns in
Exel (for finding a list of words that are equal between the two) and
create another column with the result .Can you help me?
 
For aguments lets suppose that the data to be compared are in columns A and
B - cells 1 to 10 respectively, and if they dont match fasle will appear in
the corresponding row in column C.

dim strA as string
dim strB as string
dim x as integer

for x=1 to 10
strA=cells(x,1)
strB=Celss(x,2)
if strA<>strB then cells(x,3).value = false
next x
 
yes it works but i need to compare each cell of the column B with each cell
of the column A,
maybe i need to use the comand loop until ?
 

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

Similar Threads


Back
Top