View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Chickering Charles Chickering is offline
external usenet poster
 
Posts: 272
Default VBA Find & Replace Intelligently

Here's something simple to get you started, select the first cell with a name
in it, all cells to be replaced must be numbers only.
Sub ReplaceNumeric()
Do
If IsNumeric(ActiveCell) Then
ActiveCell.PasteSpecial xlPasteAll
Else
ActiveCell.Copy
End If
ActiveCell.Offset(1).Select
Loop Until ActiveCell = ""
End Sub
--
Charles Chickering

"A good example is twice the value of good advice."


"David127" wrote:

Hello- I'm looking for a way of automating the replacement of a variable list
of numbers preceded by a name & then repeat until a blank space. For example:

Start With End With
Name1 Name1
33333 Name1
33334 Name1
33335 Name1
Name2 Name2
44444 Name2
44445 Name2
44466 Name2

Thanks in advance!