I would like to name a particular cell in every worksheet "Sales" using VBA. Thus Sheet A would have A!Sales and Sheet B would have B!Sales. The following is a snippet of my very amateurish code. How can I code the RefersTo:= so that it is using variables instead of the hard coded cell address? Thanks in advance.
__________________________________________
Selection.Find(What:="Sales", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True).Cells(1, 10).Select
TotRev = ActiveCell.Value
TotRevRow = ActiveCell.Row
TotRevCol = ActiveCell.Column
NewTicker = TickerSymbol & "!Sales"
ActiveWorkbook.Names.Add Name:=NewTicker, RefersTo:="=a!$J$104"
________________________________________
Richard
__________________________________________
Selection.Find(What:="Sales", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True).Cells(1, 10).Select
TotRev = ActiveCell.Value
TotRevRow = ActiveCell.Row
TotRevCol = ActiveCell.Column
NewTicker = TickerSymbol & "!Sales"
ActiveWorkbook.Names.Add Name:=NewTicker, RefersTo:="=a!$J$104"
________________________________________
Richard