Copy Cell if Cell Below is the Same

I have the following table and need to copy the amount columns into an email corresponding to each cardholder in the table. As of now, I am only copying one row at a time, even when the cardholder column is the same. Does anyone have a suggestion on how to set up the code so I can copy all the amounts that correspond to each cardholder.
Row 3: Copy Cell C3
Row 4: Copy Cells C4:C5
Row 6: Copy cells C6:C8

Hi @timothy_w_reaC
Use two variables for the cardholder values so you can compare the current value with the previous value read. Then put it into an if statement like this for example:

If (CH vale previous)=(CH value actual)
Then go to next row
Else read the current row

1 Like