I am trying to use excel formulas to transfer data from....


I am stuck tring to move data from a data entry, spreadsheet, to a database spreadsheet, and to a monthly report spreadsheet. 



Nice workbook! I assume you might want to move data from, for example, db_Shipping to de_Shipping. Not knowing how either worksheet works, and taking note of the date changte buttons at the top of de_Shipping, I can only tell you that doing the transfers via Worksheet functions is likely to be too cumbersome. In order to suggest code for this purpose the information you have provided is grossly insufficient.
Variatus (rep: 4544) Dec 22, '17 at 9:16 pm
Add to Discussion



Here is a bare-bones way to use a macro to get data from one worksheet to another:

Sub dataInput()

'Sheet to get data from
sourceSheet = "SheetName"

'Destination sheet
destinationSheet = "SheetName"

'Get the next empty row
NextRow = Sheets(destinationSheet).Range("A" & Rows.Count).End(xlUp).Offset(1).Row

'    Input the data

'Imported value.
Sheets(destinationSheet).Range("A1").Value = Sheets(sourceSheet).Range("A1").Value

End Sub

Replace SheetName for the sourceSheet variable with the name of the worksheet where you want to get the data. Replace the same thing for the destinationSheet variable with the name of the worksheet where you want to put the data.

Range("A1") contains the reference of the cell where you want to get the data from and where you want to store it.

The macro is pretty straight-forward but you will have to put a new line for each piece of data that you want to copy. You could do a full-row copy/paste, but some of your worksheets looked like they didn't have the same columns in the same order, in which case, you will have to copy each cell of data individually.

Try this macro out on a new workbook first until you understand how it works and then tweak it for your situation and copy it to the file with data once you get everything working.



Ok I will try it ty.
jsmith301 Dec 22, '17 at 2:17 pm
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login