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: 13
Default Copy Paste Special Value using Code over Several Worksheets


I want to copy paste special values that I have based on looking up a date
(in C.O.S H4) and then pasting and copying directly in the same sell over
various worksheets, startng in worksheet Sales. The value in C.O.S H4 that I
am looking for in each worksheet might not always be in Column A

I've managed to do this for one worksheet but can't seem to do it for more
than one How can I join several of these codes together?

The code I'm using and works great for just one area is

Public Sub SetupDatabase()
Dim wsSheet As Worksheet
Dim dTest As Double
dTest = Worksheets("C.O.S").Range("H4").Value
For Each wsSheet In Sheets(Array("Sales"))
With wsSheet
For Each rCell In .Range("A3:A" & .Range("A" &
Rows.Count).End(xlUp).Row)
If rCell.Value = dTest Then
With rCell.Offset(0, 1).Resize(, 26)
.Value = .Value



End With
End If
Next rCell
End With
Next wsSheet

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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Macro to copy & paste-special-values data to selected worksheets tomhelle Excel Discussion (Misc queries) 1 May 5th 10 02:00 PM
Copy paste special CGCPA Excel Discussion (Misc queries) 7 December 9th 08 06:50 PM
Copy and Paste special F. Lawrence Kulchar Excel Discussion (Misc queries) 2 September 24th 08 02:32 AM
Copy; Paste; Paste Special are disabled Mack Neff[_3_] Excel Discussion (Misc queries) 0 April 28th 08 06:29 PM


All times are GMT +1. The time now is 11:34 AM.

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"