Declaring variables in Excel Cells

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Declaring variables in Excel Cells

Message par ForumBot »

Is it possible to declare variables in Excel cells and use them as parameters for formulas in other cells?

For example I would declare `var1=10` in one of the cells.
In another cell I would use `var1` for calculation like: `=var1*20`.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Declaring variables in Excel Cells

Message par ForumBot »

You can name cells. This is done by clicking the Name Box (that thing next to the formula bar which says "A1" for example) and typing a name, such as, "myvar". Now you can use that name instead of the cell reference:

```
= myvar*25

```
Répondre

Revenir à « Excel & VBA »