I am trying to add an extra column using the Hstack function. The third column I need to use a Text join using the delimiter ":" for the refunds who are duplicate customers and the other ones just the single refund. Here is the data.
Book1 | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Name | Amount | Voucher | ||
2 | John Smith | 50 | 10020 | ||
3 | Paul Rudd | 100 | 10021 | ||
4 | John Smith | 200 | 10022 | ||
5 | Jane Smith | 500 | 10023 | ||
6 | |||||
7 | =HSTACK(UNIQUE(A2:A5),SUMIFS(B2:B5,A2:A5,UNIQUE(A2:A5))) | ||||
8 | |||||
9 | What I want: | ||||
10 | Name | Amount | Voucher | ||
11 | John Smith | 250 | 10020:10022 | ||
12 | Paul Rudd | 100 | 10021 | ||
13 | Jane Smith | 500 | 10023 | ||
Sheet1 |