Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How to copy selected data

Hallo,

I have the next macro which is based to make a calculation with specific
selected data. Now I don't want to do a calculation, but just copy the
selected data to a different place in the same worksheet. How can I do this
with VBA.

wks.Name = "Sheet1"

j = 13
For i = 1 To 4
wks.Select
Set rng = Range("C2:C97")
avgWT = Application.SumIf(rng, "WT", rng.Offset(0, j)) / _
Application.CountIf(rng, "WT") 'This is line has to change
Range("AR20".Offset(0, i - 1).Value = avgWT
j = j + 1
Next

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 to copy & paste-special-values data to selected worksheets tomhelle Excel Discussion (Misc queries) 1 May 5th 10 02:00 PM
copy only selected worksheets CC Excel Discussion (Misc queries) 1 October 9th 08 06:57 PM
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Excel Worksheet Functions 1 August 30th 07 04:54 PM
Copy selected lines WTG Excel Worksheet Functions 9 February 17th 06 02:45 AM
Copy selected data to new workbook Pete[_8_] Excel Programming 3 July 19th 03 01:24 AM


All times are GMT +1. The time now is 11:46 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"