Naming a cell

2

Good Night,

I'm making a rule in vba that will rotate to all rows in the worksheet. So I created a variable, cells (l, 3)="ID", but when I call this variable in the formulas it is returning the word ID instead of the value in the cell (L, 3).

Can anyone help me?

    
asked by anonymous 01.03.2017 / 05:50

1 answer

1

Via VBA

Dim r As Range
Set r = Range("E2")
r.Name = "ONomeDaCelula"

Alternative via Excel Interface

Open the context menu of the cell you want to define a name for. You can do this by right-clicking:

  

Setthenameofthedialogbox:

  

Totest,enteravalueinthecell

  

Selectanyothercellandinvokethevaluebythequickformulainput.Inthiscaseitis=foo

  

Thiswillhavetheexpectedresult

  

    
01.03.2017 / 06:02