Macro for adding win / loss records

Copper Contributor

Hi there.  I'm looking for a way to add home won/loss records to away won/loss records to get a total won/loss record.  For instance, if cell C2 is home won/loss record and that equals 58-37 and cell D2 is away won/loss record and that equals 34-49, I would like those two cells to be summed into a total won/loss record of 92-86 in cell A2.  All of the cells are formatted as text.  Thanks in advance for your help!

2 Replies

@grassland7964 

=LET(wlh, TEXTSPLIT(C2, "-"), wla, TEXTSPLIT(D2, "-"), INDEX(wlh, 1)+INDEX(wla, 1)&"-"&INDEX(wlh, 2)+INDEX(wla, 2))

@HansVogelaar Thanks so much for the quick response!