View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] beety007@gmail.com is offline
external usenet poster
 
Posts: 1
Default (VBA Function ?) Lookup value and copy it into antoher worksheet

Hi all,

Who can help me with this issue. I have 2 worksheets with specific data
in it (Each Sheet contains about +/- 2000 records) and I would like to
create a very special lookup function. (With copying cells if possible)
To illustrate the problem please take a look at this example:

For Example:

Sheet1:

NAME REFNUMBER COLOR
John 1
Michael 1
Kenneth 2
Keith 1

Sheet 2:

REFNUMBER COLOR
1 Green
1 Green-Blue
1 Green-Yellow
2 Black
2 Black-Yellow
2 Black-Purple
2 Black-Grey
3 Pink

I want to create a lookup function wich will look-up the reference
number in Sheet2 and paste all the corresponding colors value in sheet
1.

So Sheet1 should become:

NAME REFNUMBER COLOR
John 1 Green
Green-Blue
Green-Yellow
Michael 1 Green
Green-Blue
Green-Yellow
Kenneth 2 Black
Black-Yellow
Black-Purple
Black-Grey
Keith 1 Green
Green-Blue
Green-Yellow

Is it possible to crate such a function (with or without VBA Code)

Thanks in advance!

Kind Regards,