Send worksheet values to another worksheet

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,231
Office Version
  1. 2007
Platform
  1. Windows
Morning,
After entering values on a specific invoice worksheet it then gets printed & it is that this time i also wish to save some info from this worksheet to another.
Some info for you.
Invoice worksheet is called INV
The workbook the values will be sent to is called MOTORCYCLES & the sheet name is INVOICES

Here is the path.
C:\Users\Ian\Desktop\REMOTES ETC\DR\EXCEL WORKSHEETS\MOTORCYCLES.xlsm

Cell position from one to another
G13 to Column A
L16 to Column B
L15 to Column C
H52 to Column D
H53 to Column E
L13 to Column F
L4 to Column G

As values are added each time the pasted values will need to be added in the row after last value row with values in.

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I was trying something like this but it doesnt allow for values allready entered.
So i await a working code please.


Rich (BB code):
Set wb = Workbooks.Open(FileName:="C:\Users\Ian\Desktop\REMOTES ETC\DR\EXCEL WORKSHEETS\MOTORCYCLES.xlsm")

Workbooks("DR.xlsm").Sheets("DATABASE").Range("G13").Copy

Wb.Sheets("MOTORCYCLES.xlsm").Sheets("INVOICES("A").PasteSpecial xlPasteValues

wb.Close True

Else

Exit Sub
Workbooks("DR.xlsm").Sheets("DATABASE").Range("A5").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub
 
Upvote 0
OK,
This copies / pastes the required values.

BUT

Ive only managed to do it using a fixed range, A2,B2,C2 etc etc
I need the code to look for last row with values in THEN paste in next available row.


Rich (BB code):
Private Sub CommandButton1_Click()

        Set wb = Workbooks.Open(fileName:="C:\Users\Ian\Desktop\REMOTES ETC\DR\EXCEL WORKSHEETS\MOTORCYCLES.xlsm")
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("G13").Copy
        wb.Sheets("INVOICES").Range("A2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("L16").Copy
        wb.Sheets("INVOICES").Range("B2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("L15").Copy
        wb.Sheets("INVOICES").Range("C2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("H52").Copy
        wb.Sheets("INVOICES").Range("D2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("H53").Copy
        wb.Sheets("INVOICES").Range("E2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("L13").Copy
        wb.Sheets("INVOICES").Range("F2").PasteSpecial xlPasteValues
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("L4").Copy
        wb.Sheets("INVOICES").Range("G2").PasteSpecial xlPasteValues
        
        wb.Close True
        
        
        Workbooks("TEST DR.xlsm").Sheets("INV").Range("G2").Select
        Application.CutCopyMode = False
        ActiveWorkbook.Save
                                    
End Sub
 
Upvote 0
Anybody able to advise please how i paste to a column etc as opposed to a fixed cell range
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top