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.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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>
 
Upvote 0
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>
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top