Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Help with macro
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. |
#2
|
|||
|
|||
Help with macro
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 "Ken G." wrote in message ... 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. |
#3
|
|||
|
|||
Help with macro
Thanks Biff. Don't know where I got the idea vlookup wouldn't work across two
sheets. All done now. "Biff" wrote: 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 "Ken G." wrote in message ... 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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with macro
How do you make the vlookup continue on down a column, basically repeating
the same function? "Ken G." wrote: 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. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with macro
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. chelles wrote: How do you make the vlookup continue on down a column, basically repeating the same function? "Ken G." wrote: 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. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |