Thread
:
Define Names in Excel
View Single Post
#
2
Bob Phillips
Posts: n/a
Define Names in Excel
Dave,
VBA OK?
Sub UpdateNames()
Dim nme As Name
For Each nme In ActiveWorkbook.Names
If nme.Name Like "*Jan*" Then
Names.Add Name:=Replace(nme.Name, "Jan", "Feb"),
RefersTo:=nme.RefersTo
nme.Delete
End If
Next nme
End Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Dave T at home" <Dave T at
wrote in message
...
Insert - I have a workbook for each month of the year. I have named
cells
in the workbook e.g. DT_Inc_Jan_Pupil_Hourly_Cash and
DT_Exp_Jan_Fuel_Cash.
I have pasted the names into a workbook.
I would like to copy these NAMES and do a replace from '_Jan_' to '_FEB_'
etc as I need an entry for each month and then Define them in Names.
Can this be done easily without adding each entry in Insert - Name -
Define or can someone help me please with an easier / better method?
Thanks
Dave
Reply With Quote