Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stuart
See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Hi, I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the response Ron,
How will it work if i just want say 3 specific cells copied to the second sheet? "Ron de Bruin" wrote: Hi Stuart See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Hi, I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stuart
Which cells ? Paste Below each other or next to each other on one row in the database sheet ? -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Thanks for the response Ron, How will it work if i just want say 3 specific cells copied to the second sheet? "Ron de Bruin" wrote: Hi Stuart See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Hi, I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to copy a cell that contains the week ending date, the total tax
paid and total cash income and record this on one row of the database sheet, i can send you the sheet if it would help "Ron de Bruin" wrote: Hi Stuart Which cells ? Paste Below each other or next to each other on one row in the database sheet ? -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Thanks for the response Ron, How will it work if i just want say 3 specific cells copied to the second sheet? "Ron de Bruin" wrote: Hi Stuart See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Hi, I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stuart
I always do this if i want this Below my data in ror 100 for example I do this in A100:C100 (you can hide that row) I use a formula like this =A1, =C3, =E5 I use this example then http://www.rondebruin.nl/copy1.htm#range1 But this is a other way to do it for you for cell A1,C3, E5 in "Sheet1" Sub copy_2() Dim destrange As Range Dim lr As Long Dim cell As Range Dim Cnum As Long Cnum = 0 lr = LastRow(Sheets("Sheet2")) + 1 For Each cell In Sheets("Sheet1"). _ Range("A1,C3,E5") Cnum = Cnum + 1 Set destrange = Sheets("Sheet2").Cells(lr, Cnum) cell.Copy destrange Next cell 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 http://www.rondebruin.nl "Stuart" wrote in message ... I would like to copy a cell that contains the week ending date, the total tax paid and total cash income and record this on one row of the database sheet, i can send you the sheet if it would help "Ron de Bruin" wrote: Hi Stuart Which cells ? Paste Below each other or next to each other on one row in the database sheet ? -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Thanks for the response Ron, How will it work if i just want say 3 specific cells copied to the second sheet? "Ron de Bruin" wrote: Hi Stuart See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... Hi, I have a worksheet containing details of weekly takings, i would like to have a macro that will copy certain cell data and add it to the next available row of sheet 2, any ideas please? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro: Copy data to another sheet | Excel Discussion (Misc queries) | |||
1 Create a macro to Copy & paste certain data to another sheet | Excel Discussion (Misc queries) | |||
Macro to copy data from One sheet to another | Excel Discussion (Misc queries) | |||
Macro: Insert, copy and past data from sheet | Excel Discussion (Misc queries) | |||
Use macro to check a range of cells within a row and copy wanted data to new sheet | Excel Programming |