Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Martin,
Thank you for your response, and I am amazed you actually understood what I was asking. Your advice helped immensely. Thanks again, Tony. "Martin Fishlock" wrote: Tony: Assume that colum A has unsorted gs, column D has sorted gs and column E has hs and column b will hold the hs. There are two ways to do it, a formula or a macro. The formula is: cell [b1]=vlookup(a1,d:e,2,false) and then copy it down the other way is a macro: sub pasteinvalues dim r as long r=1 ' assume start at row 1 no headers do while cells(r,1).value <"" cells(r,2) = application.worksheetfunction.vlookup( _ cells(r,1),range("D:E"),2,false) if r = 35536 then exit sub r = r+1 loop end sub -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Astucchi" wrote: Example: g1 g1 h2526 g5 g2 h2365 g9 g3 h2256 I have 400 items in one column that are not in the correct order but it is the order they need to stay in. And I have another 2 colums that have the data in order with an associated value. I need to take the values (h numbers) and place them next to the corresponding "g number". Any help would be great. Thanks, Tony. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro | Excel Discussion (Misc queries) | |||
Look up data in colum a and find match in colum b | Excel Discussion (Misc queries) | |||
compare data in two lists to find matching entries | Excel Discussion (Misc queries) | |||
Look up data in colum a and find match in colum b | Excel Discussion (Misc queries) | |||
compare data in two lists to find matching entries | Excel Discussion (Misc queries) |