LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Find & Replace / Loop & Vlookup

That worked great Tom.. thanks...
To have this work, I must have the "new data" on the current worksheet. How
would I run this if the Column replacments data were on say "DATASHEET" ...

thanks

"Tom Ogilvy" wrote:

typo on rows,count should be rows.count

set rng1 = Range(Cells(1,"G"), Cells(rows.count,"G").End(xlup))

--
Regards,
Tom Ogilvy


"thom hoyle" wrote in message
...
Ok, I tried that but I keep getting a failue:
Error message:
Compile error: Wrong number of arguments or invalid properties assignment:
On the 2nd Cells with this part of the code:
set rng1 = Range(Cells(1,"G"), Cells(rows,count,"G").End(xlup))


thanks
thom

"Tom Ogilvy" wrote:

Make the sheet with column G the active sheet then run a macro like:

Sub DoReplacements()
Dim rng as Range, rng1 as Range
With Worksheets("Sheet1")
set rng = .Range(.cells(1,1),.Cells(rows.count,1).End(xlup))
End With

set rng1 = Range(Cells(1,"G"), Cells(rows,count,"G").End(xlup))

for each cell in rng
rng1.Replace cell.Value, cell.offset(0,1).Value
Next
End Sub

Test this on a copy of your workbook
--
Regards,
Tom Ogilvy


"thom hoyle" wrote in message
...
I'm working on this data dump. Data is only in Column G
Column G contains
249
271
333
etc..

I need to find every instance of "249" and replace with "249 DNA" .
I would like it to look at my Sheet1 For the Find & Replace starting

in
Column A, Row 1, and replace with Column B data.
Make Sense...

thanks...








 
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 loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 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
Replace Loop Darrell[_4_] Excel Programming 1 November 21st 03 04:49 PM


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