Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 69
Default Named range changes values

Excel 2003 SR2

I'm working through some VBA and save often to other worksheets. I have
several named ranges (Rows1_5000, 5001-10000, etc). The range is from $A$1
to $K$5000. But I notice that ranges sometimes change to H or C in place of
K. I have the $ in front of the row and column - I thought that would keep
it defined as I wanted. How come it changes? What can I do to keep it the
way I first defined it? It is very time consuming to continously check and
change it.

TIA,

CaroleO
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 207
Default Named range changes values

Carole O,
Have you tried Row and Column reference in your VBA program?
$A$1 is R1C1
$K$5000 is R5000C11
VBA might work better with this reference.
HTH
:-)

"Carole O" wrote:

Excel 2003 SR2

I'm working through some VBA and save often to other worksheets. I have
several named ranges (Rows1_5000, 5001-10000, etc). The range is from $A$1
to $K$5000. But I notice that ranges sometimes change to H or C in place of
K. I have the $ in front of the row and column - I thought that would keep
it defined as I wanted. How come it changes? What can I do to keep it the
way I first defined it? It is very time consuming to continously check and
change it.

TIA,

CaroleO

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Named range changes values

Based on the error I got when I entered R1C1:R5000C11 in the Named Range, I'm
guessing this has to replace the Range reference in the VBA Code.

This is what I have:

Range("A1").Select
Application.Goto Reference:="Rows1_5000"
Selection.Copy
Sheets("5000").Select
ActiveSheet.Paste

How should the second line look?

"FloMM2" wrote:

Carole O,
Have you tried Row and Column reference in your VBA program?
$A$1 is R1C1
$K$5000 is R5000C11
VBA might work better with this reference.
HTH
:-)

"Carole O" wrote:

Excel 2003 SR2

I'm working through some VBA and save often to other worksheets. I have
several named ranges (Rows1_5000, 5001-10000, etc). The range is from $A$1
to $K$5000. But I notice that ranges sometimes change to H or C in place of
K. I have the $ in front of the row and column - I thought that would keep
it defined as I wanted. How come it changes? What can I do to keep it the
way I first defined it? It is very time consuming to continously check and
change it.

TIA,

CaroleO

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 207
Default Named range changes values

CaroleO,
This is what it should look like:

Range("A1:K5000").Select
Selection.Copy
Sheets("Sheet10").Select
Range("A1").Select
ActiveSheet.Paste
End Sub
Range("A1:K5000") or Range("$A$1:$K$5000") is the choice to copy.
Sheets("Sheet10") is the destination worksheet.
Range("A1") is the start position of the copy.
HTH
Good Luck,
:-)
"CaroleO" wrote:

Based on the error I got when I entered R1C1:R5000C11 in the Named Range, I'm
guessing this has to replace the Range reference in the VBA Code.

This is what I have:

Range("A1").Select
Application.Goto Reference:="Rows1_5000"
Selection.Copy
Sheets("5000").Select
ActiveSheet.Paste

How should the second line look?

"FloMM2" wrote:

Carole O,
Have you tried Row and Column reference in your VBA program?
$A$1 is R1C1
$K$5000 is R5000C11
VBA might work better with this reference.
HTH
:-)

"Carole O" wrote:

Excel 2003 SR2

I'm working through some VBA and save often to other worksheets. I have
several named ranges (Rows1_5000, 5001-10000, etc). The range is from $A$1
to $K$5000. But I notice that ranges sometimes change to H or C in place of
K. I have the $ in front of the row and column - I thought that would keep
it defined as I wanted. How come it changes? What can I do to keep it the
way I first defined it? It is very time consuming to continously check and
change it.

TIA,

CaroleO

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default Named range changes values

Carole

you could just use:

Range("Rows_5000").Copy Sheets("5000").Range("A1")

Regards

Trevor


"CaroleO" wrote in message
...
Based on the error I got when I entered R1C1:R5000C11 in the Named Range,
I'm
guessing this has to replace the Range reference in the VBA Code.

This is what I have:

Range("A1").Select
Application.Goto Reference:="Rows1_5000"
Selection.Copy
Sheets("5000").Select
ActiveSheet.Paste

How should the second line look?

"FloMM2" wrote:

Carole O,
Have you tried Row and Column reference in your VBA program?
$A$1 is R1C1
$K$5000 is R5000C11
VBA might work better with this reference.
HTH
:-)

"Carole O" wrote:

Excel 2003 SR2

I'm working through some VBA and save often to other worksheets. I
have
several named ranges (Rows1_5000, 5001-10000, etc). The range is from
$A$1
to $K$5000. But I notice that ranges sometimes change to H or C in
place of
K. I have the $ in front of the row and column - I thought that would
keep
it defined as I wanted. How come it changes? What can I do to keep it
the
way I first defined it? It is very time consuming to continously check
and
change it.

TIA,

CaroleO



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
formula for named cell/range using cell values alex Excel Worksheet Functions 2 August 27th 05 06:44 PM
Cannot Expand Named Range - when size of the Range exceeds Snig Excel Discussion (Misc queries) 1 July 7th 05 01:46 PM


All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"