Method to programatically create range

tdp3290

Board Regular
Joined
Feb 15, 2007
Messages
58
Is it possible to programatically create a range by counting down 1000 rows and then calling it "Rng1000", counting down another 1000 rows and calling it "Rng2000" etc until I have gone down thousands of rows?

Can I then perform a recalculation on each selected range one at a time?

Thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Just be example:

Rich (BB code):
Sub AddNames()
Dim i As Long
    
    For i = 10 To 90 Step 10
        ThisWorkbook.Names.Add Name:="MyRange_" & i / 10, RefersTo:="=Sheet1!" & Range(Cells(i - 9, 1), Cells(i, 1)).Address
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,601
Messages
6,125,763
Members
449,259
Latest member
rehanahmadawan

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