Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-23-2021, 03:58 AM
doeclapton doeclapton is offline How to do row specific macro only if column criteria is met Windows 7 64bit How to do row specific macro only if column criteria is met Office 2010
Novice
How to do row specific macro only if column criteria is met
 
Join Date: Jul 2019
Posts: 8
doeclapton is on a distinguished road
Default How to do row specific macro only if column criteria is met

Good day,

I would like to know how to do a macro that occurs only on a specific row IF a that row's first column has the string "Q.J." inside it.

For example, if we have this table:
Column 1 Column 2 Column 3
2021-Q.J. Short-Case-Name-c. Doe-Clapton
2021-A.K. Short-Case-Name-v. Doe-Clapton-french


2020-T.J. Short-Case-Name-v. Doe-Clapton-english

I would like the macro to find for the string "Q.J." in the entire table's first column.
If it finds "Q.J.", I would like to have the following changes applied to that specific row only:

1. replace "Q.J." with "J.Q."
2. replace the string "c." in column with "v."
3. insert the string "english in column 3

This would the result:
Column 1 Column 2 Column 3
2021-J.Q. Short-Case-Name-v. Doe-Clapton-english
2021-A.K. Short-Case-Name-v. Doe-Clapton-french
2020-T.J. Short-Case-Name-v. Doe-Clapton-english

I've also attached a screenshot of the real world document where I will be using the macro.

I hope you could help me on this one.

Thanks!
Attached Images
File Type: png macrohelp.png (56.6 KB, 16 views)
Reply With Quote
 

Tags
table macro condition, word table macro

Thread Tools
Display Modes


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 06:29 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