Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-26-2024, 05:58 AM
vivka vivka is offline VBA Add text to beginning of each row in second column Windows 7 64bit VBA Add text to beginning of each row in second column Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

Hi! If I understand your point correctly, I think your task can be easily accomplished if you Find-Replace tabs followed by "(" with tabs followed by "means" followed by "(" BEFORE converting your txt to a tbl. After doing what you need just reverse the replacements:
Code:
Sub Enter_Wd()

Dim oRng As range
Set oRng = selection.range
    oRng.Find.ClearFormatting
    oRng.Find.Replacement.ClearFormatting
    With oRng.Find
        .text = "(^9)\("
        .Replacement.text = "\1means("
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
        .Execute Replace:=wdReplaceAll
    End With
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Add text to beginning of each row in second column Column issues.... Inserting text in column one moves text in column two kita299 Word 3 01-15-2023 05:06 PM
VBA Add text to beginning of each row in second column Add text at beginning of cells in Word table WJSwanepoel Word VBA 2 08-17-2022 05:11 AM
Automatically put a text string at the beginning of a paragraph jthomas666 Word 2 08-22-2019 12:27 PM
VBA Add text to beginning of each row in second column Add text to the beginning/ending of each line in word ballmoney Word 1 01-17-2010 02:19 AM
Looping macros to add text to beginning and end of a paragraph pachmarhi Word VBA 0 02-16-2009 06:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:03 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