Help with macro

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

Guest

I have a workbook with 2 worksheets. Each contains a column of part numbers
with associated data. What I want to do is look at a part number in the
second sheet and bring over some of the data for that part number from the
first sheet.
I know I can't use Vlookup across 2 sheets, and in any case I don't want to
re-sort the data as required by vlookup. (its in date order, not part number
order) I'm guessing this can only be done with a macro.
Can anyone help?

Thanks.
 
Hi!
I know I can't use Vlookup across 2 sheets, and in any case I don't want to
re-sort the data as required by vlookup. (its in date order, not part
number
order)

You can use Vlookup across sheets and the data only needs to be sorted if
you're dealing with numeric values where there may not be an exact match.

Can you post a small sample of data?

Biff
 
Thanks Biff. Don't know where I got the idea vlookup wouldn't work across two
sheets. All done now.
 
How do you make the vlookup continue on down a column, basically repeating
the same function?
 
Dim myRng as range
dim myCell as range

with activesheet
set myrng = .range("A1",.cells(.rows.count,"A").end(xlup))
end with

for each mycell in myrng.cells
'do something to mycell
next mycell

is one way.
 

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