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
41,803
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
41,803
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,078,466
Messages
5,340,485
Members
399,378
Latest member
voodoo1

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top