Posts tagged: name

Display sheetname in cell formula

=MID(CELL(”filename”,A1),FIND(”]”,CELL(”filename”,A1))+1,256)

Use a defined name in your macro

I want my vba macro to refer to a name I defined in a worksheet within the current workbook:

'Define y as the value of a cell you have named NAME..
    Application.GoTo Reference:="NAME"
    y = ActiveCell.Value

'Define y as the row of a cell you have named NAME..
    Application.GoTo Reference:="NAME"
    y = ActiveCell.Row

'Define y as the column of a cell you have named NAME..
    Application.GoTo Reference:="NAME"
    y = ActiveCell.Column