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 & replace help


How can I find cell A1 (all instances) in column C and replace them with
cell B1, then automatically find cell A2 (in all instances) and replace
them with cell B2, and so on until columns A and B are used up? I have
tried the macro, but this gets me no where. Please help!

Thanks,
Jason


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default find & replace help

Jason,

Dim findCell As Range

Set findCell = Range("A1")
On Error Resume Next
Do While Not IsEmpty(findCell)
Columns("C").Replace findCell, findCell.Offset(0,
1), xlWhole
Set findCell = findCell.Offset(1, 0)
Loop
On Error GoTo 0
Set findCell = Nothing


The On Error statement takes care of the cases of when
there are no matches.

Kevin Beckham


-----Original Message-----

How can I find cell A1 (all instances) in column C and

replace them with
cell B1, then automatically find cell A2 (in all

instances) and replace
them with cell B2, and so on until columns A and B are

used up? I have
tried the macro, but this gets me no where. Please help!

Thanks,
Jason


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default find & replace help


Thanks Kevin. How do I get started though? Is that VB script? Where do I
input the command? I am really new to the advanced featues of Excel,
but I am willing to learn. Do you have any good resources, books, etc.,
that you can point me to?

Much apreciated,
Jason


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default find & replace help

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

jasemhi wrote:

Thanks Kevin. How do I get started though? Is that VB script? Where do I
input the command? I am really new to the advanced featues of Excel,
but I am willing to learn. Do you have any good resources, books, etc.,
that you can point me to?

Much apreciated,
Jason

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


--

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 & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
Find and Replace - Replace with Blank Space Studebaker Excel Discussion (Misc queries) 4 April 3rd 23 10:55 AM
Find and replace results can the appearance of find be different? LLS at DPW Excel Discussion (Misc queries) 2 October 26th 09 11:16 PM
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


All times are GMT +1. The time now is 06:56 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"