Thread
:
copy range between sheets
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
copy range between sheets
try this
Sub copyifnumber()
Dim roundnumber As Integer
roundnumber = InputBox("Enter the round number for which you would like
summary for.", "Summary")
K = 4
For J = 4 To 700
If Worksheets(1).Cells(J, "C") = roundnumber Then
Worksheets(4).Range("C" & K, "L" & K).Value = _
Worksheets(1).Range("F" & J, "O" & J).Value
K = K + 1
End If
Next J
End Sub
--
Don Guillett
SalesAid Software
"chick-racer" wrote in message
...
I would like to know how I can copy ranges between sheets.
What i have for code right now doesnt work at all.
Could someone give advice? Thank you.
here's what i have so far:
roundNumber = InputBox("Enter the round number for which you would like
summary for.", "Summary")
K = 4
For J = 4 To 700
If Worksheets(1).Cells(J, "C") = roundNumber Then
Set rng = Worksheets(1).Range("F" & J, "O" & J)
Set newrng = Worksheets(4).Range("C" & K, "L" & K)
newrng = rng
K = K + 1
End If
Next J
---
Message posted from
http://www.ExcelForum.com/
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]