Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default excel macro to copy data to second sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel macro to copy data to second sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default excel macro to copy data to second sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel macro to copy data to second sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default excel macro to copy data to second sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel macro to copy data to second sheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro: Copy data to another sheet Anders[_2_] Excel Discussion (Misc queries) 3 October 18th 09 01:43 PM
1 Create a macro to Copy & paste certain data to another sheet Lin1981 Excel Discussion (Misc queries) 1 November 6th 08 11:56 PM
Macro to copy data from One sheet to another Jurassien Excel Discussion (Misc queries) 1 January 22nd 07 10:52 PM
Macro: Insert, copy and past data from sheet Metaldream7 Excel Discussion (Misc queries) 0 November 8th 06 09:31 PM
Use macro to check a range of cells within a row and copy wanted data to new sheet busspeed[_3_] Excel Programming 1 September 29th 04 03:59 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"