Using a Named Range

A

Always Learning

Hi Guys,

I have 2 sheets 1 of them is named "defaults" and I have named a few ranges
in that sheet.
For instance B3 is named OS_Good and is set to 0.23

My question is, How do I use the named range when in my main sheet.

If I am in my main sheet and I want to say in code "Activecell = OS_Good *
6" How do I refer to OS_Good in the Sheet named "Defaults"

I hope this makes sense to you as I do not think I am explaining myself
well.

Best Regards,

Steve.
 
B

Bob Phillips

If it is a global name, not worksheet specific, just use

=OS_Good*6

If it is a worksheet specific name, use

=Defaults!OS_Good*6

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
A

Always Learning

Hi Bob,
Thanks for the reply.

I have used this bit of code:
Dim Temp As Long
Temp = Defaults!OS_Good * 6
But I keep getting an Object Required Error.

I'm obviously doing something wrong.
Any ideas?

Best Regards,

Steve .
 
B

Bob Phillips

Sorry, I gave you worksheet formulae.

You probably only need

Temp = Range("Defaults!OS_Good") * 6

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Top