PDA

View Full Version : Solved: Giving a name to a Range in Excel?



jungix
08-07-2006, 10:06 AM
hi,

I need to use the code that someone else wrote (I can't copy a sample here though).

In his code, he uses a name called "plotratio". I know what it refers to (the range in my worksheet). In some cells he explicitely referred to it: e.g. =MIN(plotratio)

My problem is that I saw nowhere where he set plotratio to be this specific range. I used the find method in Excel and in VBA to find any occurences of "plotratio" but it calls only calls to this name, never a declaration or a Set.

Do you have any idea what kind of data it can be and how to use this?

Thanks,
Jungix

mdmackillop
08-07-2006, 10:11 AM
It could have been set "manually" using Insert/Name/Derfine on worksheet. If you're going to use it in your code, remember to wrap it in quotes. =Min("PlotRatio")

jungix
08-07-2006, 10:21 AM
Thanks mdmackillop.

I found all the names used in here.

Just so you know (but maybe it depends of my options), it works perfectly well without "" but it doesn't work with them.

mdmackillop
08-07-2006, 10:41 AM
It's in code that you need the quotes. eg

Set PR = Range("PlotRatio")

jungix
08-07-2006, 10:49 AM
Ok. Thanks again.