SOLTEC
Board Regular
- Joined
- Feb 11, 2015
- Messages
- 195
- Office Version
- 365
- 2019
- Platform
- Windows
Sub ConcatImageGroups()
Dim LastRow As Long, Ar As Range
LastRow = Cells(Rows.Count, "M").End(xlUp).Row
Range("O2:O" & LastRow) = Evaluate("IF(M2:M" & LastRow & "=1,1,"""")")
For Each Ar In Range("O2:O" & LastRow).SpecialCells(xlBlanks).Areas
Ar(1).Offset(-1).Resize(Ar.Count + 1) = Join(Application.Transpose(Ar(1). _
Offset(-1, 1).Resize(Ar.Count + 1)), ";")
Next
End Sub
Thank you in advance for all assistance. It is greatly appreciated.
Dim LastRow As Long, Ar As Range
LastRow = Cells(Rows.Count, "M").End(xlUp).Row
Range("O2:O" & LastRow) = Evaluate("IF(M2:M" & LastRow & "=1,1,"""")")
For Each Ar In Range("O2:O" & LastRow).SpecialCells(xlBlanks).Areas
Ar(1).Offset(-1).Resize(Ar.Count + 1) = Join(Application.Transpose(Ar(1). _
Offset(-1, 1).Resize(Ar.Count + 1)), ";")
Next
End Sub
Excel 2010 | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | ID | Images | Combination Images | ||
2 | 4658 | 1000.jpg | 1000.jpg;1001.jpg;1002.jpg;1003.jpg;1004.jpg;1005.jpg; | ||
3 | 4658 | 1001.jpg | 1000.jpg;1001.jpg;1002.jpg;1003.jpg;1004.jpg;1005.jpg; | ||
4 | 4658 | 1002.jpg | 1000.jpg;1001.jpg;1002.jpg;1003.jpg;1004.jpg;1005.jpg; | ||
5 | 4658 | 1004.jpg | 1000.jpg;1001.jpg;1002.jpg;1003.jpg;1004.jpg;1005.jpg; | ||
6 | 4658 | 1005.jpg | 1000.jpg;1001.jpg;1002.jpg;1003.jpg;1004.jpg;1005.jpg; | ||
7 | 4703 | 1024.jpg | 1024.jpg;1025.jpg;1026.jpg; | ||
8 | 4703 | 1025.jpg | 1024.jpg;1025.jpg;1026.jpg; | ||
9 | 4703 | 1026.jpg | 1024.jpg;1025.jpg;1026.jpg; | ||
10 | 4913 | 1031.jpg | |||
11 | 4913 | 1032.jpg | |||
12 | 4939 | 1035.jpg | |||
13 | 4939 | 1036.jpg | |||
14 | 4939 | 1037.jpg | |||
15 | 4939 | 1038.jpg | |||
16 | 5047 | 1045.jpg | |||
17 | 5047 | 1046.jpg | |||
18 | 5047 | 1047.jpg | |||
19 | 5047 | 1048.jpg | |||
20 | 5079 | 1051.jpg | |||
21 | 5079 | 1057.jpg | |||
22 | 5079 | 1058.jpg | |||
23 | 5079 | 1059.jpg | |||
24 | 5135 | 1060.jpg | |||
25 | 5135 | 1061.jpg | |||
26 | 5135 | 1062.jpg | |||
27 | 5135 | 1063.jpg | |||
28 | 5135 | 1064.jpg | |||
29 | 5135 | 1065.jpg | |||
30 | 5135 | 1066.jpg | |||
31 | 5135 | 1067.jpg | |||
32 | 5135 | 1070.jpg | |||
33 | 5135 | 1071.jpg | |||
34 | 5135 | 1072.jpg | |||
35 | 5135 | 1073.jpg | |||
36 | 5135 | 1074.jpg | |||
37 | 5135 | 1079.jpg | |||
Sheet5 |
Thank you in advance for all assistance. It is greatly appreciated.