ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Send data to another worksheet.... (https://www.excelbanter.com/excel-programming/275763-send-data-another-worksheet.html)

Ste_uk

Send data to another worksheet....
 
Hiya Board,

I have a workbook that contains 10 worksheets,
Page one is for data input,

This is what I am trying to acheive.......
Copy data in row 3 and automatically move it to another worksheet...
dependant on what I enter in cell A1.
(Lets say the names of the other worksheets are Red White Blue...etc)

So if I enter "Red" in A1..
The data is sent to the chosen worksheet.
(data sent must append to the existing data)

I know this is asking a lot, but any help or pointers in the right
direction would be greatly appreciated,

(I have learned how to copy data from one sheet to another (appended)
but i cannot figure this one out.

Kind Regards

Stephen.
:confused:

Don Guillett[_4_]

Send data to another worksheet....
 
Since you already know how to copy to the other ws, this should help.
Sub otherws()
x = Sheets("othersheet").Cells(65536, "A").End(xlUp).Row + 1
MsgBox x
End Sub


"Ste_uk" wrote in message
...
Hiya Board,

I have a workbook that contains 10 worksheets,
Page one is for data input,

This is what I am trying to acheive.......
Copy data in row 3 and automatically move it to another worksheet...
dependant on what I enter in cell A1.
(Lets say the names of the other worksheets are Red White Blue...etc)

So if I enter "Red" in A1..
The data is sent to the chosen worksheet.
(data sent must append to the existing data)

I know this is asking a lot, but any help or pointers in the right
direction would be greatly appreciated,

(I have learned how to copy data from one sheet to another (appended)
but i cannot figure this one out.

Kind Regards

Stephen.
:confused:




Ste_uk[_2_]

Send data to another worksheet....
 
Wow - Thanks for the speedy response!

I give them a go,


Kind Regards
Stephen
:D

Ron de Bruin

Send data to another worksheet....
 
Typo

Set sourceRange = Sheets("Input ").Rows("3:3")


must be

Set sourceRange = Sheets("Input").Rows("3:3")



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
One way to copy only the values
With the Input sheet named "Input"
Copy all code in a normal module.
There is no error check if the sheet exist in this example

Sub copy()
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Dim Firstcell As String
Firstcell = Sheets("Input").Cells(1, 1).Value
Lr = LastRow(Sheets(Firstcell)) + 1
Set sourceRange = Sheets("Input ").Rows("3:3")
Set destrange = Sheets(Firstcell).Rows(Lr). _
Resize(sourceRange.Rows.Count)
destrange.Value = sourceRange.Value
End Sub


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
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ste_uk" wrote in message ...
Hiya Board,

I have a workbook that contains 10 worksheets,
Page one is for data input,

This is what I am trying to acheive.......
Copy data in row 3 and automatically move it to another worksheet...
dependant on what I enter in cell A1.
(Lets say the names of the other worksheets are Red White Blue...etc)

So if I enter "Red" in A1..
The data is sent to the chosen worksheet.
(data sent must append to the existing data)

I know this is asking a lot, but any help or pointers in the right
direction would be greatly appreciated,

(I have learned how to copy data from one sheet to another (appended)
but i cannot figure this one out.

Kind Regards

Stephen.
:confused:






Ste_uk[_3_]

Send data to another worksheet....
 
Hi Ron

Finally got around to trying the code....
It does exactly as I requested (thank you)

However it has created other unforseen issues that I now need to
tackle,

I will give them a go but dont be suprised if you see another post in a
weeks time!

Once again,
Many thanks for your help

Kind regards

Stephen.


All times are GMT +1. The time now is 01:14 AM.

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