Value translation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have set up global constant as follows

Global Const ROW_X = 21


On one of my worksheets I have placed "ROW_X - 1" in a cell.

When I read the value in the cell I get "ROW_X - 1". I need to get this
translated into 21 - 1 which would equal 20.

How can I do this?

Thanks
 
Hi Sheldon,

You cannot use a VBA constant in your worksheet.

Instead, try using a defined name:

Insert | Name | Define | In the names box type RowX
| In the Refers to box type =21 | OK

Now, typing ROWX - 1 in the cell will return 20.
 

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