View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Gerstman David Gerstman is offline
external usenet poster
 
Posts: 57
Default worksheets and ranges

I need to compare values in two different worksheets within the same
workbook. So I want logic like

for each c in range1

for each d in range 2

if c....value = d....value then

do something
end if

next d

next c

The problem is that I can create the first range by using an active sheet.
When I try to do a second range using worksheets(index) I get an error. What
am I doing wrong? How do I do it correctly?