ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   is it possible to find common data between to colums and match (https://www.excelbanter.com/excel-worksheet-functions/120986-re-possible-find-common-data-between-colums-match.html)

Astucchi

is it possible to find common data between to colums and match
 
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.



All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com