Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Paste data from another worksheet

I am currently trying to paste information from a main worksheet onto different worksheets based on the divisions. I can get it to copy the data, but cannot get it over to the new worksheet. Here is the code:

Private Sub CommandButton1_Click()
Dim a As Integer, b As Integer, c As Integer, rng As Range, div As String
Set rng = Range("A3:I1002")
a = 3
b = 2
c = 2
For a = 3 To 20
div = Cells(a, 8).Value
If Cells(a, 1).Value < 10000 Then
Exit For
End If
Select Case div
Case "Mold Build"
rng.Rows(a - 2).Copy
Worksheets(2).Activate
**** This is where the paste should go, but I can't get it to work
b = b + 1
Worksheets(1).Activate
Case Else
rng.Rows(a - 2).Copy
Worksheets(3).Activate
**** This is where the paste should go, but I can't get it to work
c = c + 1
Worksheets(1).Activate
End Select
Next a
End Sub
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
How to move data on worksheet Bonnie Excel Discussion (Misc queries) 3 February 23rd 05 05:49 PM
How can I show data under a Chart that I inserted in a worksheet? Kimo Charts and Charting in Excel 1 February 21st 05 04:11 PM
extract data from worksheet sallu Excel Worksheet Functions 2 February 21st 05 06:50 AM
How do I paste data into filtered list in Excel? DanBomb Excel Discussion (Misc queries) 3 February 2nd 05 10:49 PM
sending data from one cell to another (not using copy & paste) Charlie Payne Excel Worksheet Functions 3 December 6th 04 03:28 PM


All times are GMT +1. The time now is 05:41 AM.

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"