ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   transfering data from a one workbook to another workbook (https://www.excelbanter.com/excel-programming/438048-transfering-data-one-workbook-another-workbook.html)

David Shoemaker

transfering data from a one workbook to another workbook
 
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders

Ron de Bruin

transfering data from a one workbook to another workbook
 
See the last example on this page
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders



Gary Brown[_5_]

transfering data from a one workbook to another workbook
 
Creae a pivot table in the second workbook that references the data in the
firs workbook.
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"David Shoemaker" wrote:

I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders


David Shoemaker

transfering data from a one workbook to another workbook
 
It is giving me a compile error saying (sub or function not defined)

Sub Copy_To_Another_Workbook()

Lr = LastRow(DestSh)

"Ron de Bruin" wrote:

See the last example on this page
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders


.


Ron de Bruin

transfering data from a one workbook to another workbook
 
Read good

Important: The macro examples use one function or two functions that

you can find in the last section of this page.


Copy the LastRow function also in your module


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
It is giving me a compile error saying (sub or function not defined)

Sub Copy_To_Another_Workbook()

Lr = LastRow(DestSh)

"Ron de Bruin" wrote:

See the last example on this page
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders


.



David Shoemaker

transfering data from a one workbook to another workbook
 
I copied straight from your web site, can you send me an example because I
still cant get it to work

Thanks for all your help

"Ron de Bruin" wrote:

Read good

Important: The macro examples use one function or two functions that
you can find in the last section of this page.


Copy the LastRow function also in your module


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
It is giving me a compile error saying (sub or function not defined)

Sub Copy_To_Another_Workbook()

Lr = LastRow(DestSh)

"Ron de Bruin" wrote:

See the last example on this page
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders

.


.


Ron de Bruin

transfering data from a one workbook to another workbook
 
It is very easy

If you want to test the first code example

Sub copy_1()
Dim SourceRange As Range, DestRange As Range
Dim DestSheet As Worksheet, Lr As Long

With Application
.ScreenUpdating = False
.EnableEvents = False
End With

'fill in the Source Sheet and range
Set SourceRange = Sheets("Sheet1").Range("A1:K1")

'Fill in the destination sheet and call the LastRow
'function to find the last row
Set DestSheet = Sheets("Sheet2")
Lr = LastRow(DestSheet)

'With the information from the LastRow function we can
'create a destination cell and copy/paste the source range
Set DestRange = DestSheet.Range("A" & Lr + 1)
SourceRange.Copy DestRange

With Application
.ScreenUpdating = True
.EnableEvents = True
End With

End Sub


You must also copy this function from my page

Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I copied straight from your web site, can you send me an example because I
still cant get it to work

Thanks for all your help

"Ron de Bruin" wrote:

Read good

Important: The macro examples use one function or two functions that
you can find in the last section of this page.


Copy the LastRow function also in your module


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
It is giving me a compile error saying (sub or function not defined)

Sub Copy_To_Another_Workbook()

Lr = LastRow(DestSh)

"Ron de Bruin" wrote:

See the last example on this page
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David Shoemaker" wrote in message
...
I have a workbook that i enter data into, and i want to take certain data in
that workbook and transfer it to another workbook with a pivot table so i can
use it like a data base so i can search or orders

.


.




All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com