View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Value translation

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.


---
Regards,
Norman



"Sheldon" wrote in message
...
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