earthworm
Well-known Member
- Joined
- May 19, 2009
- Messages
- 773
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi All,
Below is the data set . I need vba and formula approach that can create unique value from Column A and then merge all the values that are distributed into multiple rows into single cell
Example I have shown the required result in Column E and F . Please assist . I am using office 2016
Below formula works well in excel 2021 . However I need formula and vba for older version of excel
=TEXTJOIN(",",TRUE,IF($A$3:$A$21=E3,$C$3:$C$21,""))
Below is the data set . I need vba and formula approach that can create unique value from Column A and then merge all the values that are distributed into multiple rows into single cell
Example I have shown the required result in Column E and F . Please assist . I am using office 2016
Below formula works well in excel 2021 . However I need formula and vba for older version of excel
=TEXTJOIN(",",TRUE,IF($A$3:$A$21=E3,$C$3:$C$21,""))
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
2 | A | B | C | Result | |||||
3 | 1 | Test 1 | AB1 | 1 | AB1,AB2,AB3,AB4 | AB1,AB2,AB3,AB4 | |||
4 | 1 | Test 2 | AB2 | 2 | AB5 | AB5 | |||
5 | 1 | Test 3 | AB3 | 3 | AB6 | AB6 | |||
6 | 1 | Test 4 | AB4 | 4 | AB7,AB8,AB9 | AB7,AB8,AB9 | |||
7 | 2 | Test 5 | AB5 | 5 | AB10 | AB10 | |||
8 | 3 | Test 6 | AB6 | 6 | AB11 | AB11 | |||
9 | 4 | Test 7 | AB7 | 7 | AB12,AB13,AB14,AB16,AB17 | AB12,AB13,AB14,AB15,AB16,AB17 | |||
10 | 4 | Test 8 | AB8 | 8 | AB18 | AB18 | |||
11 | 4 | Test 9 | AB9 | 9 | AB19 | AB19 | |||
12 | 5 | Test 10 | AB10 | ||||||
13 | 6 | Test 11 | AB11 | ||||||
14 | 7 | Test 12 | AB12 | ||||||
15 | 7 | Test 13 | AB13 | ||||||
16 | 7 | Test 14 | AB14 | ||||||
17 | 7 | Test 15 | AB15 | ||||||
18 | 7 | Test 16 | AB16 | ||||||
19 | 7 | Test 17 | AB17 | ||||||
20 | 8 | Test 18 | AB18 | ||||||
21 | 9 | Test 19 | AB19 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G3:G11 | G3 | =TEXTJOIN(",",TRUE,IF($A$3:$A$21=E3,$C$3:$C$21,"")) |