VBA for Concatenate

Walesm3011

New Member
Joined
Sep 11, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Digit 1Digit 2Digit 3Digit 4Digit 5Digit 6Digit 7Digit 8
C
1​
1​
1​
1​
0​
1​
1​
C
1​
1​
2​
2​
0​
2​
2​
C
1​
1​
3​
3​
0​
3​
3​
C
1​
1​
4​
4​
0​
4​
4​
C
1​
1​
5​
5​
0​
5​
5​
C
1​
1​
6​
6​
0​
6​
6​
C
1​
1​
7​
0​
7​
C
1​
1​
8​
0​
8​
C
1​
1​
9​
0​
9​
C
1​
1​
10​
0​
C
1​
1​
11​
0​
C
1​
1​
12​
0​
C
1​
1​
13​
0​


Hi all,
I am looking for a Excel VBA solution for all possible outcomes of a concatenate for the above 8 columns of data with the logic as follows Digit 1. Digit 2. Digit 3 . Digit 4 through to digit 8 each digit should be separated by a .
In the above data

Digit 1 will always = C,
Digit 2 = 1,
Digit 3 = 1,
Digit 4 could anything from 1 to 13,
Digit 5 could could anything from 1 to 6,
Digit 6 will always be 0,
Digit 7 could be anything from 1 to 9,
Digit 8 could be anything from 1 to 6

eg C.1.1.2.3.0.2.6

Any help would be greatly appreciated
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
No VBA needed. Assuming digit 1 is cell A1, in cell I2 use:

=A2&"."&B2&"."&C2&"."&D2&"."&E2&"."&F2&"."&G2&"."&H2

Then populate down the column.
 
Upvote 0
Thanks grey mud but not exactly what i am looking for . I am looking for all potential concatenates for all potential combinations of digits 1 to 8 eg C.1.1.2.3.0.2.6 or C.1.1.6.2.0.1.1 or C.1.1.13.6.0.9.6 etc etc, .
 
Upvote 0

Forum statistics

Threads
1,215,323
Messages
6,124,246
Members
449,149
Latest member
mwdbActuary

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