Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find and Replace several items


H,

I need a macro that will allow me to do several find and replace
actions within a specific column. The column will have category
infromation selected by our customers from a drop down list such as
automotive, books etc. We need to then convert these to numbers so
automotive becomes 1, books becomes 2 etc.

Any ideas?


--
rachelreveley
------------------------------------------------------------------------
rachelreveley's Profile: http://www.excelforum.com/member.php...fo&userid=2138
View this thread: http://www.excelforum.com/showthread...hreadid=480663

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Find and Replace several items

the macro recorder is your friend
Sub Macro6()
'
' Macro6 Macro
' Macro recorded 10/31/2005 by Don Guillett
'

'
Columns("H:H").Select
Selection.Replace What:="books", Replacement:="1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

cleaned up to this
Sub replaceallincolumn()
With Columns("H")
..Replace what:="books", replacement:=1
..Replace what:="papers", replacement:=2
End With
End Sub
--
Don Guillett
SalesAid Software

"rachelreveley"
wrote in message
news:rachelreveley.1xs62c_1130785513.6659@excelfor um-nospam.com...

H,

I need a macro that will allow me to do several find and replace
actions within a specific column. The column will have category
infromation selected by our customers from a drop down list such as
automotive, books etc. We need to then convert these to numbers so
automotive becomes 1, books becomes 2 etc.

Any ideas?


--
rachelreveley
------------------------------------------------------------------------
rachelreveley's Profile:

http://www.excelforum.com/member.php...fo&userid=2138
View this thread: http://www.excelforum.com/showthread...hreadid=480663



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
How can I use replace(alt+H) for mutiple items needing replace Gery Excel Worksheet Functions 1 June 15th 05 05:51 PM
Excel: Be able to mark specifc items in the find/replace mode & a. MJLOVESMICROSOFT Excel Worksheet Functions 0 March 22nd 05 10:15 PM


All times are GMT +1. The time now is 02:34 AM.

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

About Us

"It's about Microsoft Excel"