Our old system outputs text files of invoices showing the Invoice# in Column C and the various part order lines in Column D.
If there is only one part per Invoice the data is fine.
But if there are multiple parts being ordered the Invoice# in column C will appear ONLY in Line 1 and not in any subsequent row until there is a newer Invoice#.
I am trying to make a macro to copy down the Invoice number to all the lines of the same invoice.
The logic of whether to do it is easy: =IF(AND(C3="",D3>D2),"Copy","")
But I have no idea of how to make a macro be smart enough to drag down the invoice number in C to all the cells until the next filled C cell.
If there is only one part per Invoice the data is fine.
But if there are multiple parts being ordered the Invoice# in column C will appear ONLY in Line 1 and not in any subsequent row until there is a newer Invoice#.
I am trying to make a macro to copy down the Invoice number to all the lines of the same invoice.
The logic of whether to do it is easy: =IF(AND(C3="",D3>D2),"Copy","")
But I have no idea of how to make a macro be smart enough to drag down the invoice number in C to all the cells until the next filled C cell.