Compare blocks of cells

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

Guest

Is there a quick way to compare a block of cells in a row without doing
something like
a = activecell.value
B= activecell.offset(0,1).value
c = activecell.offset(0,2).value

Different worksheet.
Range(A1).activate
if activecell.value = a and activecell.offset(0,1).value = b and
activecell.offset(0,2).value = c then

'code

end if

I ask because I need to compare two worksheets and there's about 8 columns
to match and it just seems really cumbersome.
 
Hi, you need to change your strategy for comparison as follows. Write a VBA
code that does the following,
1. Loops across columns
1.1. Loops within the cells in the column
1.1.1. check if content in cell1 of worksheet1 matches the content in cell2
of worksheet2.
 

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

Back
Top