PC Review


Reply
Thread Tools Rate Thread

bug in excel range naming?

 
 
Michal AKA Miki
Guest
Posts: n/a
 
      27th Dec 2006
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

 
Reply With Quote
 
 
 
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      27th Dec 2006
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

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      27th Dec 2006
On Wed, 27 Dec 2006 02:41:38 +0100, "Michal AKA Miki"
<(E-Mail Removed)> 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
 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      27th Dec 2006
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
>
>

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      27th Dec 2006
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
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      27th Dec 2006
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" <(E-Mail Removed)> wrote in message
news:emsj0p$1dl$(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup naming a range in excel 07 Steven Microsoft Excel Worksheet Functions 1 27th Jun 2008 04:07 PM
Dynamic range naming in VB6.3 for Excel Paul Chapman Microsoft Excel Programming 3 6th Mar 2005 03:00 AM
Naming a range versus formula in Excel Jos Vens Microsoft Excel Programming 4 14th Jul 2004 01:26 PM
naming a range in excel lior03 Microsoft Excel Programming 2 15th Oct 2003 06:23 PM
Naming a Range in Excel dave Microsoft Excel Misc 1 28th Aug 2003 05:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 PM.