2 sheets, Connect 2 formulas, Vlookup and Concatenate

sidbag

New Member
Joined
Nov 3, 2019
Messages
2
Hi Great minds.

Greetings.

I have a file with 2 sheets

Values for example:


Sheet 1
CodeProductTypeColour
sd123NecklaceOxidizedBlack
hf32BanglesGoldRose Gold

<tbody>
</tbody>

If we input a code from sheet 1 to sheet 2 manually, we would like to get the following result.

Sheet 2
Code (Input)Concatenate result
sd123NecklaceOxidizedBlack

<tbody>
</tbody>

Similarly if code input is hf32 then the result needs to be BanglesGoldRose Gold


What is the formula I need to input in sheet 2

Hope I have been able to make my question clear.

Kindly help.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
42,231
Office Version
365
Platform
Windows
Welcome to the MrExcel board!

If you have the CONCAT function in your Excel version, then you can use B2, otherwise C2

<b>Sheet2</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial,Arial; font-size:8pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:77px;" /><col style="width:179px;" /><col style="width:169px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-size:10pt; ">Code</td><td style="font-size:10pt; ">Concatenate result</td><td style="font-size:10pt; "> </td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-size:10pt; ">sd123</td><td style="font-size:10pt; ">NecklaceOxidizedBlack</td><td style="font-size:10pt; ">NecklaceOxidizedBlack</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B2</td><td >=CONCAT(INDEX<span style=' color:008000; '>(Sheet1!$B$2:$D$3,MATCH<span style=' color:#0000ff; '>(A2,Sheet1!$A$2:$A$3,0)</span>,0)</span>)</td></tr><tr><td >C2</td><td >=VLOOKUP(A2,Sheet1!$A$2:$D$3,2,0)&VLOOKUP(A2,Sheet1!$A$2:$D$3,3,0)&VLOOKUP(A2,Sheet1!$A$2:$D$3,4,0)</td></tr></table></td></tr></table>

<b>Sheet1</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial,Arial; font-size:8pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:54px;" /><col style="width:73px;" /><col style="width:70px;" /><col style="width:80px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-size:10pt; ">Code</td><td style="font-size:10pt; ">Product</td><td style="font-size:10pt; ">Type</td><td style="font-size:10pt; ">Colour</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-size:10pt; ">sd123</td><td style="font-size:10pt; ">Necklace</td><td style="font-size:10pt; ">Oxidized</td><td style="font-size:10pt; ">Black</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-size:10pt; ">hf32</td><td style="font-size:10pt; ">Bangles</td><td style="font-size:10pt; ">Gold</td><td style="font-size:10pt; ">Rose Gold</td></tr></table>
 

sidbag

New Member
Joined
Nov 3, 2019
Messages
2
Thanks Peter. This solves a part of the problem. Your answer is complete in respect of the question I asked. I did not mention that I need to add some text strings, spaces to form sentences, hence wanted to include concatenate.

I don't have concat, so using formula given in C2

For example:

Finished product of Row 2 will look some thing like this:

Modern design Necklace made of Oxidized alloys in Black Color

Values picked in bold are picked up from Vlookup formula but also need to spaces and text (normal in above example) so am looking at concatenate or if there is another better way of doing it.

Thanks a lot in advance.



Welcome to the MrExcel board!

If you have the CONCAT function in your Excel version, then you can use B2, otherwise C2

Sheet2

ABC
1CodeConcatenate result
2sd123NecklaceOxidizedBlackNecklaceOxidizedBlack

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:77px;"><col style="width:179px;"><col style="width:169px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B2=CONCAT(INDEX(Sheet1!$B$2:$D$3,MATCH(A2,Sheet1!$A$2:$A$3,0),0))
C2=VLOOKUP(A2,Sheet1!$A$2:$D$3,2,0)&VLOOKUP(A2,Sheet1!$A$2:$D$3,3,0)&VLOOKUP(A2,Sheet1!$A$2:$D$3,4,0)

<tbody>
</tbody>

<tbody>
</tbody>


Sheet1

ABCD
1CodeProductTypeColour
2sd123NecklaceOxidizedBlack
3hf32BanglesGoldRose Gold

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:54px;"><col style="width:73px;"><col style="width:70px;"><col style="width:80px;"></colgroup><tbody>
</tbody>
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
42,231
Office Version
365
Platform
Windows
Finished product of Row 2 will look some thing like this:

Modern design Necklace made of Oxidized alloys in Black Color
The formula would be

="Modern design "&VLOOKUP(A2,Sheet1!$A$2:$D$3,2,0)&" made of "&VLOOKUP(A2,Sheet1!$A$2:$D$3,3,0)&" alloys in "&VLOOKUP(A2,Sheet1!$A$2:$D$3,4,0)& " Color"


BTW, best not to fully quote long posts as it makes the thread harder to read/navigate. If you want to quote, quote small, relevant parts only.
 
Last edited:

Forum statistics

Threads
1,081,845
Messages
5,361,663
Members
400,643
Latest member
RockStar89

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top