Concatenate

Xirom431

Board Regular
Joined
Dec 2, 2010
Messages
102
Hi, I need help with VBA to concatenate info base on data in cells of Column.

My sheet has header info on Row 1
Rows have range from 1 to 500
Column range is A to AY
If cells in D column contain number 57600, concatenate cells B & D and enter info into column AE to AY cells
if not, concatenate cells in B & D and each AE to AY header info and enter it into column AE to AY cells.
Thanks for the help in advance.

1601757383747.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
How about in E2 copied down & across
Excel Formula:
=TEXTJOIN(".",1,$B2,$D2,IF($D2=57600,"",E$1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
How about in E2 copied down & across
Excel Formula:
=TEXTJOIN(".",1,$B2,$D2,IF($D2=57600,"",E$1))
This formula would also work (even in versions of Excel that do not have the TEXTJOIN function)...
Excel Formula:
=$B2&"."&$D2&IF($D2=57600,"","."&E$1)
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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