View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Find & Replace / Loop & Vlookup

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...