Concatenate Break Formula

Craig Naylon

New Member
Joined
Jan 26, 2013
Messages
2
Hi,

The below table represents what I am currently doing manually but would am trying to come up with a formula to do for me. Or, some combination of formulas to get to the result I need.

I need to write the result in the HTML column Currently I'm using the concatenation formula in the Formula column. It is simply concatenating the html tags and the data in the Description column for every cell where the Prod Ref # is the same. I'm copying / pasting the formula into the cell where the next Prod Ref # changes and removing the cell references or adding cell references as necessary to the formula. It's VERY time consuming and inefficient.

I have a .xls with 10,000's of lines. I can't figure out how to automatically break and start a new concatenation formula as the Prod Ref # changes.

Any Suggestions?

Thanks.

Prod Ref #DescriptionFormulaHTML
201000DESC1'=CONCATENATE("
",B2,"

",B3,"

",B4,"

",B5,"

",B6,"

",B7,"
")
DESC1

DESC2

DESC3

DESC4

DESC5

DESC6
201000DESC2
201000DESC3
201000DESC4
201000DESC5
201000DESC6
201002
DESC1

<tbody>
</tbody>
'=CONCATENATE("
",B8,"

",B9,"

",B10,"
")
DESC1

DESC2

DESC3
201002
DESC2

<tbody>
</tbody>
201002
DESC3

<tbody>
</tbody>
201004
DESC1

<tbody>
</tbody>
'=CONCATENATE("
",B11,"

",B12,"

",B13,"

",B14,"

",B15,"
")
DESC1

DESC2

DESC3

DESC4

DESC5
201004
DESC2

<tbody>
</tbody>
201004
DESC3

<tbody>
</tbody>
201004
DESC4

<tbody>
</tbody>
201004
DESC5

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Use two formulae. Column C to build up the concatenation, and column D to only show it on the first row of a product.
Put these formulae in C2 and D2, then copy down:
=B2&IF(A2=A3,C3,"")
=IF(A1=A2,"",C2)
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,183
Members
448,872
Latest member
lcaw

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