LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Copy & Paste values macro...almost there?

Hi there, l am struggling with the final tweaks of the macro below, l can
to find and select the correct data(thanks to this ng) after the data
is selected it is copied, then l want to paste the values (values only) into
the correct ws...l have got it to go to the correct ws but I just don't
know how to get it to paste the values there...have l structured the
macro incorrectly.....

any help would be very welcome....TIA


Sub aaarrrggghhhh()

Dim SheetName As String
Dim sheetnumber As Long
Dim rightsheet As Long
Dim idnumber As String
Dim activeid As String
Dim xlrow As Long
Dim scennumber As Variant

'this bit finally selects and copies the data (took me ages!)
Sheets("Live History").Select
Sheets("Live History").Range("A1").End(xlDown).Select
Range(ActiveCell, ActiveCell.Offset(0, 20)).Select
Selection.Copy

Sheets("Live History").Select
Sheets("Live History").Range("N1").End(xlDown).Select
ActiveCell.Offset(0, 5).Select
idnumber = ActiveCell.Value
Sheets("Selection").Select

For sheetnumber = 1 To 5

xlrow = 3

SheetName = "S" & Format(sheetnumber, "##0")
Sheets(SheetName).Select

rightsheet = Sheets("Live History").Range("H1").End(xlDown).Value
scennumber = ActiveSheet.Cells(3, 2).Value

'This bit finds the right place to paste (suprised myself)
If rightsheet = scennumber Then
ActiveSheet.Range("BW3").End(xlDown).Select
ActiveCell.Offset(1, 0).Select

End If

Next

End Sub
 
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 to copy & paste-special-values data to selected worksheets tomhelle Excel Discussion (Misc queries) 1 May 5th 10 02:00 PM
Need help with macro to copy, paste, and clear cell values Anthony[_5_] Excel Discussion (Misc queries) 8 December 21st 09 02:11 PM
copy paste values macro Wanna Learn Excel Discussion (Misc queries) 5 July 21st 09 04:44 PM
Macro for copy and paste values excelnerd Excel Discussion (Misc queries) 3 March 8th 08 06:51 PM
Copy range in macro using paste special values Jeff Excel Discussion (Misc queries) 2 August 20th 07 08:12 PM


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

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

About Us

"It's about Microsoft Excel"