Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-23-2014, 03:51 PM
macropod's Avatar
macropod macropod is offline Search and replace/insert HTML code into Master File using tags Windows 7 32bit Search and replace/insert HTML code into Master File using tags Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and replace/insert HTML code into Master File using tags Generate sequential code tags ssarank Word VBA 3 12-25-2013 02:44 AM
How to use Find and Replace with HTML tags? srz92 Word 0 07-17-2013 07:55 AM
Search and replace/insert HTML code into Master File using tags Trying to wrap HTML tags around multiple different words in one operation String Word VBA 4 06-06-2013 06:23 AM
Attaching MSG file is stripped on send and HTML tags show on previewing prior to send Fantastic4 Outlook 0 01-09-2012 12:18 PM
Search and replace/insert HTML code into Master File using tags For Moderator: Code tags? Ulodesk Forum Support 1 07-12-2011 07:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft