View Single Post
 
Old 02-23-2014, 03:51 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I'd be inclined to use a macro:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim LRow As Long, LCol As Long, cCol As Long, cRow As Long
Dim StrTmp As String, StrFnd As String, StrRep As String
With ActiveSheet
  LRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
  LCol = .Cells.SpecialCells(xlCellTypeLastCell).Column
  For cCol = 2 To LCol
    StrTmp = .Cells(2, cCol).Value
    For cRow = 3 To LRow
      If Trim(.Cells(cRow, 1).Value) = "" Then Exit For
      StrFnd = .Cells(cRow, 1).Value
      StrRep = .Cells(cRow, cCol).Value
      StrTmp = Replace(StrTmp, StrFnd, StrRep)
    Next
    .Cells(LRow + 2, cCol).Value = StrTmp
  Next
End With
Application.ScreenUpdating = True
End Sub
As coded, the macro outputs the modified data two rows below whatever the current last row is.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote