Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Referencing cells safely

Hello,

I am trying to find the best way to refer to cells in a large range
based on the column they are under. The number and order of columns in
the range is changed frequently and I want to make sure that the
reference always works, so I can't simply hard-code a column number.
Right now, I determine the column that I am interested in by providing
a Name to the column header and finding the column number from the
Named cell. The problem with this is that the number of named cells is
getting quite large and confusing.
Does anyone know any better ways of doing this?

Thanks,
David

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Referencing cells safely

If the cell will have consistent data, you could think about using the Find
feature and set the cell(s) to a range. Or, if you have consistent
column/row headers, you can find those and use the Column and Row numbers
from each respectively (using the Cells method).

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"



"David G" wrote in message
ups.com...
Hello,

I am trying to find the best way to refer to cells in a large range
based on the column they are under. The number and order of columns in
the range is changed frequently and I want to make sure that the
reference always works, so I can't simply hard-code a column number.
Right now, I determine the column that I am interested in by providing
a Name to the column header and finding the column number from the
Named cell. The problem with this is that the number of named cells is
getting quite large and confusing.
Does anyone know any better ways of doing this?

Thanks,
David


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Referencing cells safely

Thanks for your suggestion. Unfortunately, the data in any cell is
subject to change, including column headers. I think it is safe to
assume, though, that the meaning of columns does not change, even if
the header does. For example, if the header is changed from "Name" to
"ID", the column still represents the same data.
I must admit, I don't know exactly what kind of solution I am looking
for. I'm just looking for suggestions to see if any would fit the
requirements for this task.

On Feb 26, 4:43 pm, "Zack Barresse" wrote:
If the cell will have consistent data, you could think about using the Find
feature and set the cell(s) to a range. Or, if you have consistent
column/row headers, you can find those and use the Column and Row numbers
from each respectively (using the Cells method).

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"

"David G" wrote in message

ups.com...

Hello,


I am trying to find the best way to refer to cells in a large range
based on the column they are under. The number and order of columns in
the range is changed frequently and I want to make sure that the
reference always works, so I can't simply hard-code a column number.
Right now, I determine the column that I am interested in by providing
a Name to the column header and finding the column number from the
Named cell. The problem with this is that the number of named cells is
getting quite large and confusing.
Does anyone know any better ways of doing this?


Thanks,
David



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Referencing cells safely

A Name will work then, yes. As long as you have something that will
identify that and be constant. Whether that be a value, formula, partial
text, after a certain position/value, etc. Whatever you can logically use
to deduce the location. If you do not have a unique criterion, create one.

Does that answer your question?

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"



"David G" wrote in message
oups.com...
Thanks for your suggestion. Unfortunately, the data in any cell is
subject to change, including column headers. I think it is safe to
assume, though, that the meaning of columns does not change, even if
the header does. For example, if the header is changed from "Name" to
"ID", the column still represents the same data.
I must admit, I don't know exactly what kind of solution I am looking
for. I'm just looking for suggestions to see if any would fit the
requirements for this task.

On Feb 26, 4:43 pm, "Zack Barresse" wrote:
If the cell will have consistent data, you could think about using the
Find
feature and set the cell(s) to a range. Or, if you have consistent
column/row headers, you can find those and use the Column and Row numbers
from each respectively (using the Cells method).

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"

"David G" wrote in message

ups.com...

Hello,


I am trying to find the best way to refer to cells in a large range
based on the column they are under. The number and order of columns in
the range is changed frequently and I want to make sure that the
reference always works, so I can't simply hard-code a column number.
Right now, I determine the column that I am interested in by providing
a Name to the column header and finding the column number from the
Named cell. The problem with this is that the number of named cells is
getting quite large and confusing.
Does anyone know any better ways of doing this?


Thanks,
David




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Referencing cells safely

Yes, it does. Thank you.

On Feb 28, 4:08 pm, "Zack Barresse" wrote:
A Name will work then, yes. As long as you have something that will
identify that and be constant. Whether that be a value, formula, partial
text, after a certain position/value, etc. Whatever you can logically use
to deduce the location. If you do not have a unique criterion, create one.

Does that answer your question?

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"

"David G" wrote in message

oups.com...

Thanks for your suggestion. Unfortunately, the data in any cell is
subject to change, including column headers. I think it is safe to
assume, though, that the meaning of columns does not change, even if
the header does. For example, if the header is changed from "Name" to
"ID", the column still represents the same data.
I must admit, I don't know exactly what kind of solution I am looking
for. I'm just looking for suggestions to see if any would fit the
requirements for this task.


On Feb 26, 4:43 pm, "Zack Barresse" wrote:
If the cell will have consistent data, you could think about using the
Find
feature and set the cell(s) to a range. Or, if you have consistent
column/row headers, you can find those and use the Column and Row numbers
from each respectively (using the Cells method).


HTH


--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"


"David G" wrote in message


roups.com...


Hello,


I am trying to find the best way to refer to cells in a large range
based on the column they are under. The number and order of columns in
the range is changed frequently and I want to make sure that the
reference always works, so I can't simply hard-code a column number.
Right now, I determine the column that I am interested in by providing
a Name to the column header and finding the column number from the
Named cell. The problem with this is that the number of named cells is
getting quite large and confusing.
Does anyone know any better ways of doing this?


Thanks,
David



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
where can i get Cholesky decomposition add ins safely? Yaw Excel Worksheet Functions 1 December 2nd 08 08:53 AM
Looking for Present Value I Can Copy and Paste Safely Will[_3_] Excel Discussion (Misc queries) 1 September 22nd 08 02:46 AM
Closing Excel Safely within a Web Environment Rodney[_4_] Excel Programming 1 September 9th 05 06:40 AM
How Many Simultaneous Users Can Be Safely Handled? Alan Greenwood[_2_] Excel Programming 2 October 10th 04 06:13 AM
safely open file C Williams Excel Programming 2 September 17th 04 01:11 AM


All times are GMT +1. The time now is 10:29 AM.

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"