Concept question re ranges and calcs

  • Thread starter Thread starter Matt S
  • Start date Start date
M

Matt S

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
 
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)
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top