ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Concept question re ranges and calcs (https://www.excelbanter.com/excel-programming/415980-concept-question-re-ranges-calcs.html)

Matt S

Concept question re ranges and calcs
 
I have a macro that does a ton of calculations for me. I am looking to
update its capabilities by giving it a user-interface and more flexibility.
I am therefore moving out of the realm of doing calculations knowing which
column contains what data. So, I now have the situation where columns will
be deleted based on user-control and data may or may not be where I
originally had it.

I'm thinking the best way to handle this is to define columns of data as
ranges prior to deleting other columns around them and then doing the
calculations on the ranges. Does anyone have some input on if this is the
most efficient way to do this?

Thanks as always,
Matt

Bob Phillips

Concept question re ranges and calcs
 
I tend to just name the column header in this sort of case, and then refer
to that name in the code, expanding the range as required.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Matt S" wrote in message
...
I have a macro that does a ton of calculations for me. I am looking to
update its capabilities by giving it a user-interface and more
flexibility.
I am therefore moving out of the realm of doing calculations knowing which
column contains what data. So, I now have the situation where columns
will
be deleted based on user-control and data may or may not be where I
originally had it.

I'm thinking the best way to handle this is to define columns of data as
ranges prior to deleting other columns around them and then doing the
calculations on the ranges. Does anyone have some input on if this is the
most efficient way to do this?

Thanks as always,
Matt




Matt S

Concept question re ranges and calcs
 
Bob,

How would I go about doing that? Are you speaking of doing the Insert...
Name... Define... function in excel? I've never played with that before...

I've just created a range defined as 'Lambda' in excel. If I go to another
cell and say = Lambda+1, it highlights the entire range of lambda. How do I
get it to select a specific cell within lambda?

Thanks,
Matt

"Bob Phillips" wrote:

I tend to just name the column header in this sort of case, and then refer
to that name in the code, expanding the range as required.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Matt S" wrote in message
...
I have a macro that does a ton of calculations for me. I am looking to
update its capabilities by giving it a user-interface and more
flexibility.
I am therefore moving out of the realm of doing calculations knowing which
column contains what data. So, I now have the situation where columns
will
be deleted based on user-control and data may or may not be where I
originally had it.

I'm thinking the best way to handle this is to define columns of data as
ranges prior to deleting other columns around them and then doing the
calculations on the ranges. Does anyone have some input on if this is the
most efficient way to do this?

Thanks as always,
Matt





Bob Phillips

Concept question re ranges and calcs
 
Yes I mean exactly that, and I thought that is what you were proposing to do
anyway, but on the whole column.

Again, as you were posting in the Programming group, I thought you wanted to
do this in VBA. In you example, it would be

Range("Lambda").Cells(2,1).Value

or

Range("Lambda").Offset(1,0).Value


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Matt S" wrote in message
...
Bob,

How would I go about doing that? Are you speaking of doing the Insert...
Name... Define... function in excel? I've never played with that
before...

I've just created a range defined as 'Lambda' in excel. If I go to
another
cell and say = Lambda+1, it highlights the entire range of lambda. How do
I
get it to select a specific cell within lambda?

Thanks,
Matt

"Bob Phillips" wrote:

I tend to just name the column header in this sort of case, and then
refer
to that name in the code, expanding the range as required.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Matt S" wrote in message
...
I have a macro that does a ton of calculations for me. I am looking to
update its capabilities by giving it a user-interface and more
flexibility.
I am therefore moving out of the realm of doing calculations knowing
which
column contains what data. So, I now have the situation where columns
will
be deleted based on user-control and data may or may not be where I
originally had it.

I'm thinking the best way to handle this is to define columns of data
as
ranges prior to deleting other columns around them and then doing the
calculations on the ranges. Does anyone have some input on if this is
the
most efficient way to do this?

Thanks as always,
Matt








All times are GMT +1. The time now is 02:28 AM.

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