Declaring variables in Excel Cells

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Declaring variables in Excel Cells

Message par Clippy »

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.

ayi
Site Admin
Messages : 9242
Inscription : mer. 22 avr. 2026, 17:21

Re: Declaring variables in Excel Cells

Message par ayi »

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 »