Hi Expert,
I am very new in macro and vba and new in this forum too. I have been searching for the vba code for my case issue for days. I could not find the answer of similar case. I would like to know if my case/question have been answer/solved in this forum before and I hope someone could point me to the links. If not, I appreciate if someone could assist me on my question here.
Here is the case, I have created an invoice document in sheet1. The invoice in sheet1 having references like Invoice No, Date of Invoice, Buyer ID, Buyer Name.
In the same invoice (Sheet1) there are also several rows that stated information of what the buyer ordered. Starting from row number 24 having data of Name of item in column C, code item in column D, unit order in column E, price per unit in column F, total amount in column G, Debit Code in column M, Credit Code in column N.
I would like to copy the data of selected columns in sheet1 to another rows in sheet2. The data will be copied in to Sheet2 with the info of Invoice no., date of Invoice, buyer ID, Buyer Name, name of item , code item, unit order , price per unit , total amount , Debit Code, Credit Code,Deposit into row starting from row no. 8 (in Sheet2).
If the buyer order several items, let say , the buyer bought 3 different items with different values, the order information were placed in sheet1 at row no. 24, 25 & 26 . So the copied should be into Sheet2 with 3 rows that carried the same invoice no. date of invoice, buyer id, buyer name, deposit and grand total with 3 rows data as in row 24,25,26 in sheet1.
Whenever a new invoice created or taking place in sheet1 , the new data of the new invoice created will appended to next rows in sheet2 when the action button is click. The invoice number should be unique.
Kindly assist me. Any advise is much appreciated. Attached is file, the source data is in sheet1 and the sample of result in sheet2. I am using excel 2007.
Bookmarks