Sample Excel.xlsx

I am trying to combine the items in columns V and AF (or U and AE) into column AJ without any blanks.

I am also unsure how i would do a vlookup to get the amount if there are duplicate numbers in the credits and invoices.

Any ideas?