Thread: Add Names
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Add Names

try

For Each MyCell In MyRange
MyCell.Offset(0, 92).Name = MyCell.Text
Next MyCell


For Each MyCell In MyRange
MyCell.Offset(0, 92).value = MyCell
Next MyCell


--
Don Guillett
SalesAid Software

"Jamal" wrote in message
...
I have a long and wide spreadsheet. I need to add names to
each cell in column 93. The names should be the text in
the relevant row in colum 2. The columns in the middle are
full of other information.

I tried the following code. The error message comes up
as "That name is not Valid".

For Each MyCell In MyRange
MyCell.Offset(0, 92).Name = MyCell.Text
Next MyCell


Any help is appriciated. Thanks in advance.