Using variable names for cells

  • Thread starter Thread starter Frank Kabel
  • Start date Start date
F

Frank Kabel

Hi

dim rng as range
set rng=activesheet.range("A1")
msgbox rng.value
 
I seem to remember a technique where I could assign a variable name to
the contents of a cell so that whenever I wanted to use the contents,
all I had to do was call up the variable name. Unfortunately I cannot
find the way to set up the process. Any suggestsions or ideas would be
appreciated. Thanks and a Happy New Year.
 
You can name a cell, then use that name in a formula. For example:

In cell C2, type: .07
Select cell C2
Click in the Name Box, to the left of the formula bar
Type: GST
Press the Enter key, to complete the naming

In cell C5, type: 100
In cell C6, type: =C5*GST
Press the Enter key, to see the result.
 
Thanks very much all.

Debra said:
You can name a cell, then use that name in a formula. For example:

In cell C2, type: .07
Select cell C2
Click in the Name Box, to the left of the formula bar
Type: GST
Press the Enter key, to complete the naming

In cell C5, type: 100
In cell C6, type: =C5*GST
Press the Enter key, to see the result.
 

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