ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   bug in excel range naming? (https://www.excelbanter.com/excel-programming/380068-bug-excel-range-naming.html)

Michal AKA Miki

bug in excel range naming?
 
Good day

During my work with excel I found strange thing... I cannot name range
containing all 255 columns... When trying to do it from VBA, I have no range
defined, when I try to do it manually, range automatically is reducing to
254 (cut column A)..
Really strange

I tried to google something about it, but no results. It looks, that
microsoft does not allow to do it.. Am I right?

I checked in Excel 2000 and 2003...

Regards
Michal


[email protected]

bug in excel range naming?
 
works for me.

Sub f()
Dim b As Workbook
Dim s As Worksheet
Set b = ThisWorkbook
Set s = b.Sheets("Sheet1")
s.Range(s.Cells(1, 1), s.Cells(1, 256)).Value = "abc"
End Sub


Ron Rosenfeld

bug in excel range naming?
 
On Wed, 27 Dec 2006 02:41:38 +0100, "Michal AKA Miki"
wrote:

Good day

During my work with excel I found strange thing... I cannot name range
containing all 255 columns... When trying to do it from VBA, I have no range
defined, when I try to do it manually, range automatically is reducing to
254 (cut column A)..
Really strange

I tried to google something about it, but no results. It looks, that
microsoft does not allow to do it.. Am I right?

I checked in Excel 2000 and 2003...

Regards
Michal


I don't seem to have any problem doing this in Excel 2002

Insert/Name/Define
Row 1 Sheet1!1:1

=COLUMNS(Row1) -- 256

Or in VBA:

ActiveWorkbook.Names.Add Name:="Row2", RefersToR1C1:="=Sheet1!R2"
Debug.Print "Row2", Range("Row2").Address

Row2 $2:$2




--ron

FSt1

bug in excel range naming?
 
hi,
I just tried nameing a range with a macro and had no problem nameing a range
with all 256 columns AND 5000 rows so if a bug exists, its on your pc and not
mine. here is the syntax i used.
Sub Macrotest()
Range("A1:IV5000").Select
ActiveWorkbook.Names.Add Name:="testB", _
RefersToR1C1:=Selection
End Sub
pretty basic.
hope this helped.
regards,
FSt1

"Michal AKA Miki" wrote:

Good day

During my work with excel I found strange thing... I cannot name range
containing all 255 columns... When trying to do it from VBA, I have no range
defined, when I try to do it manually, range automatically is reducing to
254 (cut column A)..
Really strange

I tried to google something about it, but no results. It looks, that
microsoft does not allow to do it.. Am I right?

I checked in Excel 2000 and 2003...

Regards
Michal



JLGWhiz

bug in excel range naming?
 
You are not running bootleg software are you? Maybe you forgot to make your
last payment on your system and they won't let you use that last colum until
you do.

Just a little afeter Christmas humor!

"Michal AKA Miki" wrote:

Good day

During my work with excel I found strange thing... I cannot name range
containing all 255 columns... When trying to do it from VBA, I have no range
defined, when I try to do it manually, range automatically is reducing to
254 (cut column A)..
Really strange

I tried to google something about it, but no results. It looks, that
microsoft does not allow to do it.. Am I right?

I checked in Excel 2000 and 2003...

Regards
Michal



Jon Peltier

bug in excel range naming?
 
Others have shown it can be done. If you still have trouble, post a few
lines of your code. That might make it easier to spot the problem.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Michal AKA Miki" wrote in message
...
Good day

During my work with excel I found strange thing... I cannot name range
containing all 255 columns... When trying to do it from VBA, I have no
range
defined, when I try to do it manually, range automatically is reducing to
254 (cut column A)..
Really strange

I tried to google something about it, but no results. It looks, that
microsoft does not allow to do it.. Am I right?

I checked in Excel 2000 and 2003...

Regards
Michal





All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com