Concatenate

richmcgill

Board Regular
Joined
Feb 4, 2019
Messages
69
Office Version
  1. 2016
Platform
  1. Windows
I have four cells of data and I need to keep the formatting for two of the cells. I also need a ; between the sets of data.
cell a2 is a number a 1 or 2
cell b2 is 012345678 (this is a SSN without the dash's in between the numbers) need to keep all nine digits even if the leading numbers are zeros.
cell c2 name of person
cell d2 0012345678 (loan number) need to keep all 10 digits even if the leading numbers are zeros.

Should look like this
2;012345678;Persons Name;0012345678

The SSN and Loan Number need to keep the format.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
HI what version of Excel are you using?

I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Ok, two options depending on whether B2 & D2 are text with leading 0, or are numbers formatted to show leading 0s
+Fluff v2.xlsm
ABCDE
1
21012345678Fluff00123456781;012345678;Fluff;0012345678
3112345678Fluff00123456781;012345678;Fluff;0012345678
4
Sheet2
Cell Formulas
RangeFormula
E2E2=A2&";"&B2&";"&C2&";"&D2
E3E3=A3&";"&TEXT(B3,"000000000")&";"&C3&";"&TEXT(D3,"0000000000")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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