View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Changing name ranges

How about:

Sub namextender()
For Each n In ActiveWorkbook.Names
n.RefersTo = Replace(n.RefersTo, "$AP$", "$BB$")
Next
End Sub
--
Gary''s Student - gsnu200804


"chillibean" wrote:

I am using a workbook that contains hundreds of range names. I need to extend
all of the ranges so the ranges run to column BB instead of column AP as
they do now.

For example a named range is currently $M$255:$AP$255 and needs changing to
$M$255:$BB$255

Is their any way I can do the changes in one go instead of going through
Insert €“ Name €“ Define, and changing them all manually?