View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Madhan Madhan is offline
external usenet poster
 
Posts: 78
Default Compare blocks of cells

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.


"Rominall" wrote:

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.