Ask your question
Report

Excel- copy into another worksheet using code

anzt - Jan 4, 2010 7:20am GMT
Hello,

I have create an invoice workbook call POS and every invoice no will be saved as sheets with their respective invoice no.
Product informations are link from another file call STOCK. I use Vlookup to paste the product info into invoice.

Now I would like to add a code such that every product sold on the invoice will have the invoice no. and qty copied into the file STOCK. Currently I am doing a manually stock taking which is very time consuming.

Here's the placement.
Invoice no is in M5. Every invoice will be saved as a worksheet.
Product No. is in D21-D40 Qty is E21-E40.
Exchanged from Inv is I21-I40 and J21-J40 is the returned amt.

In Stock.
Product Code in Column E
Ordered Qty is in Column G
Qty available is in Column H
Total Qty sold is in Column I
Sold Invoices are Column J,K,L onwards are for the Invoices sold. The next available blank cell.

I would manually open this 2 files and look thru every sheets.

If Invoice No 108 ( CELL M5)
sold 3 qty of product no 163.
sold 4qty of product no 27-1
In the Stock Workbook, I will find the ROW where Product no 163 is and manually keyed in the invoice no. the cell in column J (108),column K (108) and column L (108). Then Total no. of 163 sold so far will be in column I. Next I will do the same for product 27-1 and keyed into the next available cell in the sold invoices.


If Invoice No 109 (CELL M5)
1 qty of product no 163 sold in Inv 108 (CELL I21). J21 will the returned amount.
1 qty of product no 88-1
customer wants to exchange 1 qty of product 163 to 88-1.
In this case i would manually update the stock by going to Product 163 Row to delete one of the cell containing 108. And go to Product row 88-1 to add in invoice 109 indicating one qty sold.

Can someone please help me to write this marco code. Or does anyone have a better solution?
Basically I am trying to cut away from manually update stock which alot of time and human errors involved.
Thanks in advance.Configuration: Mac OS X Safari 525.28.3
Read more ...
Add comment

Best answers

 C# excel copy data between worksheets - Forum

Best answer: Hi I need attendace sheet on Montly can any one help me

 C# excel copy data between worksheets - Tips

Excel - Copy row 1 to new worksheet if column x true Issue Solution Note Issue I have a list of manuals on worksheet 1 and I am trying to copy info to new sheet based on request dates. So, let's say column J is request date. If...

 Excel copy content across worksheets - Forum

Best answer: i am doing library project but i have a problems. i need VBA condinal copy and paste in to cell. also every time i paste it need to change to another cell every time.

 Excel copy cell another worksheet vbs - Forum

Best answer: Hello, Your example is not very clear. Do you mean you want to transpose the data from a horizontal position to a vertical position. If you want to transpose the rows to colums just use copy and paste special.. Make sure you mark the transpos

 Excel copy in other worksheet - Forum

Best answer: hi! i want to read data from one excel sheet through my MFC VC++ applictaion and i want to write those data into another excel worksheet.if u know the solution can u please send me the solution.

 Vba excel copy active cells from another worksheet - Forum

Best answer: Hi, I've tried something in this style, Sub () Worksheets("Sheet1").Activate Range("A1:D10").Select If active.cell.selected Then Selection.Copy Sheets("Sheet1").Select Range("A1:M1").Select ActiveSheet.Paste Else End If End Sub I manage to ge

 Excel 2007 copy and pste values vba code without select or activate - Forum

Best answer: Thanks for the Reply. I want to work between the workbooks. Copy from first workbook and paste in the 2nd workbook. In the first workbook the data starts from column B. I am looking for the current data (this monday ).And this record would be

 Csharp excel copy range worksheet values - Forum

Best answer: My question is i want to paste sum added data on other excel sheet so that data automatically make changes when i make value change it automatically change the other values in total. Thanks

 Excel - Copy a range if the a specific column is blank - Tips

Excel - Copy a range if the a specific column is blank Issue Solution Note Issue I'm trying to copy a row of data from column A - G if column D from row 8 - 209 is blank to the bottom of my spreadsheet. I used the following coding,...

 Excel - Copy/paste values on a specific column - Tips

Excel - Copy/paste values on a specific column Issue Solution Note Issue I want to, copy/paste values on the specific column based on cell A2. i.e. if cell A2= 1 then copy/paste values for the January column (range B2:B10), if A2...

 Excel - Copy from first column and transfer to other column - Tips

Excel - Copy from first column and transfer to other column Issue Solution Note Issue I have a range table that is 18 columns. I want to be able to look up the number in the first column and return all the info in the other 17 columns...

 Excel - Copy down formula if cells on left non blank - Tips

Excel - Copy down formula if cells on left non blank Issue Solution Note Issue I need code to copy down a formula from R2 to R3, R4 , R5 etc only if H3, H4, H5 etc is nonblank. I also need to copy formulae from U2:CY2 to U3:CY3,...

 Excel – Copy to next blank line - Tips

Excel – Copy to next blank line Issue Solution Note <!-- TOC --> Issue I'm new to macro - so don't laugh... I'm trying to copy Cells A1 and B1 from 400 worksheets to a single worksheet (Merge). The following macro code copies and...

 Excel - Copying row from another sheet - Tips

Excel - Copying row from another sheet Issue Solution Note Issue I am working with 2 Excel, One field is common in both the excel "SID". I need to copy the row of SID say 'ABC' from Excel B and append to the row of same SID 'ABC' in...

 Excel - Copy rows from sheet 1 to sheet 2 - Tips

Excel - Copy rows from sheet 1 to sheet 2 Issue Solution Note Issue I need to have a macro that will copy rows from sheet1 to sheet 2 . The catch is from sheet 1 col A for eg A3 may have the number 10 in it. I need to copy that row...