Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default VBA Find & Replace Intelligently

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default VBA Find & Replace Intelligently

This worked out great. Thanks!!!

"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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace - Replace with Blank Space Studebaker Excel Discussion (Misc queries) 4 April 3rd 23 10:55 AM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM
Using Find and Replace to replace " in a macro snail30152 Excel Programming 1 April 13th 06 11:58 PM
Replace method - cannot find any data to replace Mike Excel Programming 5 April 6th 06 08:56 PM


All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"