Cell "AP65536" ?

Randal

Board Regular
Joined
Mar 30, 2009
Messages
142
I am using the following code to name a range that has data in every cell from column B to column AP.

Set rRange = Range("B2", Range("AP65536").End(xlUp))
ThisWorkbook.Names.Add "TheName", rRange


Problem is that it only define through column "Z" and does not see into column AA. AB etc.

Why does this only work up to column Z? -R-
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,014
That's working for me. I would try setting a watch on rRange.Address and stepping through the code.
 

Randal

Board Regular
Joined
Mar 30, 2009
Messages
142
Thanks and sorry, my bad. It was the ColumnCount setting in the Properties of the listbox that was limiting the number of columns. After I increased the value the columns came into the listbox. -R-
 

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,863
Members
414,106
Latest member
Tigretto

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
Top