Find Multiple Cell Values

C

Cue

For the following line:

whatwant = Sheets("300-+").Range("$A$65000").Value

It will only search for that cell value that is from Sheets "300-+" color
that value on sheet "MultAdjDaily". But instead of one value, I would like it
to search for multiple cells with values and color them on "MultAdjDaily". I
tried the following but it did not work:

whatwant = Sheets("300-+").Range("$A$65000:$A$65125").Value

I want the code to take the multiple cells with values that are on sheet
"300-+" and find them and color them on sheet "MultAdjDaily".

Can you show me what to change in order for that to work?
 
D

Dave Peterson

You may need to loop through the range to pick out the values from each cell:

dim myCell as range
dim myRng as range
set myrng = Sheets("300-+").Range("$A$65000")

for each mycell in myrng.cells
whatwant = mycell.value
'your code here
next mycell
 
C

Cue

Yes! Thanks Dave for your help!
--
Cue


Dave Peterson said:
You may need to loop through the range to pick out the values from each cell:

dim myCell as range
dim myRng as range
set myrng = Sheets("300-+").Range("$A$65000")

for each mycell in myrng.cells
whatwant = mycell.value
'your code here
next mycell
 

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