Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 03-23-2021, 09:00 PM
macropod's Avatar
macropod macropod is offline How to do row specific macro only if column criteria is met Windows 10 How to do row specific macro only if column criteria is met Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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

For what the OP described, taking the 3 to mean the 3rd highlighted column:

Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "Q.J."
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = True
  End With
  Do While .Find.Execute
    If .Information(wdWithInTable) = True Then
      If .Cells(1).ColumnIndex = 1 Then
        .Text = "J.Q."
        Set Rng = .Rows(1).Range
        With Rng.Cells(5).Range.Find
          .Text = "v."
          .Replacement.Text = "c."
          .Wrap = wdFindStop
          .Execute Replace:=wdReplaceOne
        End With
        Rng.Cells(10).Range.InsertAfter " english"
      End If
    End If
    .Collapse wdCollapseEnd
  Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
table macro condition, word table macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a macro for word count in one specific column of table, only rows with white background mobj Word VBA 2 10-17-2019 03:09 AM
How can I return Vlookup only if Specific Criteria is met in 1 column of the Vlookup Array EcommDOC Excel 7 01-22-2018 11:00 AM
How to do row specific macro only if column criteria is met How can I save all attachments in a folder with specific criteria? terrymac Outlook 1 11-12-2015 06:55 AM
How to do row specific macro only if column criteria is met Excel VBA Macro - Deleting Specific Data based on criteria MD011 Excel Programming 3 12-10-2014 02:15 AM
How to do row specific macro only if column criteria is met Deleting rows with specific criteria joflow21 Excel 9 11-22-2013 12:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:08 PM.


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