LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Search and Replace columns using Case?

I want to run a macro that will search through the rows of a column and
if the value in the cell = a certain value then replace it with
another. I also want to search another column and and if the value in
the cell = a certain value then insert another value in the next column
(same row)

while Column A does not = 0
search column B
Case
Cell = dog
then replace with Cat

Cell = Rat
then replace with Mouse

and so on for many many entries (about 300)

Cell = (empty cell)
then continue to next row

search column C
Case

Cell = spot
then insert into column D - 1

Cell = ralf
then insert into column D - 2

Cell = (empty cell)
then insert into column D - 0

and so on........

I don't know VBA very well so I'm not too sure how to write this, can
anyone help.

Thanks
John


---
Message posted from http://www.ExcelForum.com/

 
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
Search and Replace, or Add New Row GEdwards Excel Discussion (Misc queries) 1 April 21st 10 08:20 AM
HELP! Search rule is case sensitive!! Don Excel Worksheet Functions 2 January 12th 09 10:43 PM
Search for Upper Case Ken Excel Discussion (Misc queries) 4 February 14th 08 08:59 PM
Search and Replace... Paul B[_7_] Excel Programming 0 October 1st 03 06:12 PM
Search and Replace... Patrick Lamb Excel Programming 0 October 1st 03 05:07 PM


All times are GMT +1. The time now is 10:17 PM.

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"