Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Send data to another worksheet....
Wow - Thanks for the speedy response!
I give them a go, Kind Regards Stephen :D |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
send excel worksheet using email | Excel Discussion (Misc queries) | |||
Send worksheet by E-Mail | Excel Discussion (Misc queries) | |||
how can I send a cell value to another worksheet? | Excel Worksheet Functions | |||
I only want to send one worksheet from excel not the all the work. | Excel Discussion (Misc queries) | |||
Is it possible to send a worksheet without the unhidden data? | Excel Worksheet Functions |