find a description in a list and add it in an other one

  • Thread starter find a description in a list and add it in an othe
  • Start date
F

find a description in a list and add it in an othe

Hello,

I would like to create a small vb code, to find a
description in a list and add it in an other one...

Let me explain my case :

I have an excel spreadsheet with two sheets...

The first one (sheet "result") contents a list like this
one :
D10993300 YG37 DistrDemand (Plnd.)
D10385135 YG38 Total Demand
D10387412 YT23 Dependent Demand
D10385167 TE45 Total Demand

This list can have a very variable size, One line or
several thousands of line


The second one, sheet "Dcode list" contents the
description of ALL the code like "D10993300"

D10383164 product A code A Descr A
D10385135 product B code B Descr B
D10383164 product C code C Descr C
D10385167 product D code D Descr D


I would like to have in my first list, for each line, the
description of the D code... Like this :

product B code B Descr B D10385135 YG38 Total Demand


If somebody could help me by providing an example for
code, it will be fantastic !

Thanks in advance for your previous help and sorry for
my "broken English" ;-)

..
 
B

Bob Phillips

You can do this without code, using VLOOKUP

=IF(NOT(ISNA(VLOOKUP(A1,'Dcode
list'!$A$1:$A$1000,1,FALSE))),VLOOKUP(A1,'Dcode
list'!$A$1:$D$1000,2,FALSE)&" "&VLOOKUP(A1,'Dcode
list'!$A$1:$D$1000,3,FALSE)&" "&VLOOKUP(A1,'Dcode
list'!$A$1:$D$1000,4,FALSE),"")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"find a description in a list and add it in an other one"
 
G

Guest

Thanks for your answer Bob, but this excel file will be
used by not experimented users... and, as this file will
have a variable size, and sometime several thousands of
lines, to use this formula will not be very handy, and
will bring the size of the file very large...

In fact, this file will be refresched (it's a business
warehouse application). I would like that the user have
his information without to have to do anything.

Thanks anyway and have a good day
 

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

Top