Nitin Suntwal
New Member
Hi There,
Attached is the file I am working with. The data i have extracted from SQL database.
I need to copy invoices details to adjacent cells. There may be cases where I may get more than 2 or 3 invoices from each sale order. The conditions are as follows:
Condition 1 : If the RO # (Sales Order #) is repeated then check Inv#'s. If there is only 1 invoice then nothing. If there are 2 invoice with same invoice # then delete dup invoice row.
Condition 2 : If the RO # (Sales Order #) is repeated twice then check Inv#'s. If there are more than 1 invoice then check Inv#'s for same SO & move to adjacent cells in same row and delete below row after copying Invoices details.
Condition 2 : If the RO # (Sales Order #) is repeated more than twice then same as condition 2 but the third invoice details will move to second invoice details row & delete both rows after copying invoices details.
Column A to G are sales orders
Column H to M are invoice details
I have given sample format in Final Data Sheet.
A2 & A3 is condition 1
A4 is condition 2
A5 is condition 3
& finally the headers should be updated to adjacent cells
Hope I am clear.
Thanks,
Nitin.
Attached is the file I am working with. The data i have extracted from SQL database.
I need to copy invoices details to adjacent cells. There may be cases where I may get more than 2 or 3 invoices from each sale order. The conditions are as follows:
Condition 1 : If the RO # (Sales Order #) is repeated then check Inv#'s. If there is only 1 invoice then nothing. If there are 2 invoice with same invoice # then delete dup invoice row.
Condition 2 : If the RO # (Sales Order #) is repeated twice then check Inv#'s. If there are more than 1 invoice then check Inv#'s for same SO & move to adjacent cells in same row and delete below row after copying Invoices details.
Condition 2 : If the RO # (Sales Order #) is repeated more than twice then same as condition 2 but the third invoice details will move to second invoice details row & delete both rows after copying invoices details.
Column A to G are sales orders
Column H to M are invoice details
I have given sample format in Final Data Sheet.
A2 & A3 is condition 1
A4 is condition 2
A5 is condition 3
& finally the headers should be updated to adjacent cells
Hope I am clear.
Thanks,
Nitin.