View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Naming a sheet from formula result

I would like to name a sheet from the result of a formula that gets is
result from a cell in a worksheet, the following is my routine but first
writes the formula to cell A1 in the worksheet, is there a more appropriate
method?

Dim shname As String
Range("A1").Formula = _
"=""DD""&Left(Right(A2, 10), 2) & Right(B2, 6)"
shname = Range("A1").Value
Range("A1").ClearContents
Sheets(1).Name = shname

Thanks, Rob