Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Replace: find part cell, replace whole cell | Excel Worksheet Functions | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find and replace results can the appearance of find be different? | Excel Discussion (Misc queries) | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |