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

Hello,

I have a list of items which stores in column A as listed below and I
want to write a macro to find from each cell within this column if any cell
contains "43" replace that cell with 43 and if any cell contains "AA" replace
that cell with AA. How can I do this? Please help!

Column A
AA4350D
AC4390A
CS3024D
43AA30D
BB4325X
AZ204CS

Thanks in advance for your help!
Anna

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Find & Replace

What is the order of importance for a cell like AA4350D?

Can't you use an IF statement instead of VBA?

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"anna" wrote:

Hello,

I have a list of items which stores in column A as listed below and I
want to write a macro to find from each cell within this column if any cell
contains "43" replace that cell with 43 and if any cell contains "AA" replace
that cell with AA. How can I do this? Please help!

Column A
AA4350D
AC4390A
CS3024D
43AA30D
BB4325X
AZ204CS

Thanks in advance for your help!
Anna

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Find & Replace

Record a macro when you select column A
Edit|Replace
what: *43*
with: 43
replace all

Edit|Replace
what: *AA*
with: AA
replace all



anna wrote:

Hello,

I have a list of items which stores in column A as listed below and I
want to write a macro to find from each cell within this column if any cell
contains "43" replace that cell with 43 and if any cell contains "AA" replace
that cell with AA. How can I do this? Please help!

Column A
AA4350D
AC4390A
CS3024D
43AA30D
BB4325X
AZ204CS

Thanks in advance for your help!
Anna


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Find & Replace

Hello Dave,

I tried to record a macro and it work perfectly.

Thank you!
Anna

---------------------------------------------------
"Dave Peterson" wrote:

Record a macro when you select column A
Edit|Replace
what: *43*
with: 43
replace all

Edit|Replace
what: *AA*
with: AA
replace all



anna wrote:

Hello,

I have a list of items which stores in column A as listed below and I
want to write a macro to find from each cell within this column if any cell
contains "43" replace that cell with 43 and if any cell contains "AA" replace
that cell with AA. How can I do this? Please help!

Column A
AA4350D
AC4390A
CS3024D
43AA30D
BB4325X
AZ204CS

Thanks in advance for your help!
Anna


--

Dave Peterson

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
Find/Replace Event or Find/Replace for Protected Sheet ... Joe HM Excel Programming 2 October 27th 07 03:55 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 07:01 PM.

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"