Set Range format

Silent2k

New Member
Joined
Dec 21, 2004
Messages
30
I have the following code but need to edit the set range to do,: L, M, N, O, P, Q, R & S. What is the proper format to put that in the~
set rng=Range(?

Dim I As Long
Dim rng As Range
For I = 1 To 22000
Set rng = Range("G" & I)
If rng.Value = True Then
rng.Offset(0, 1).Resize(1, 2).Copy
rng.Offset(0, -3).PasteSpecial Paste:=xlValues
End If
Next I
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Won't you be overwriting what you did earlier?

rng.Offset(0, -3).PasteSpecial Paste:=xlValues

You can use the Cells property, which expects an Integer as the column argument (instead of a letter). Example:

Code:
For r = 1 To 5
   For c = 12 to 19
      MsgBox Cells(r, c).Value
   Next c
Next r
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top