Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-16-2020, 12:48 PM
Purfleet Purfleet is offline Find first mention of word from list. Windows 10 Find first mention of word from list. Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

To be fair is mainly just repeating bits.

to stop partial matches use =MID(A2,AGGREGATE(15,6,SEARCH(Words&" ",A2),1),SEARCH(" ",A2,AGGREGATE(15,6,SEARCH(Words&" ",A2),1))-AGGREGATE(15,6,SEARCH(Words&" ",A2),1)).

The search part (SEARCH(Words&" ",A2),1) finds the word, the space finds the whole whole and not partials

aggregate 15 is the same as small but aggregate can deal with arrays, the 6 is telling it to ignore errors (i.e not matches). So if there are 2 matches this will find only the first one

the first AGGREGATE finds the number of the first character of the word we are looking for. (26)

the second AGGREGATE finds the number of the first space after the word we are looking for (31)

the third is just a repeat of the first AGGREGATE.

All this in the MID makes it Mid(a2,26,31-26)

Hope it helps
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find (highlight) two and more words in a list of 75k single words in Word 2010 Usora Word 8 05-29-2018 03:34 AM
VBA find word and create numbered list under it WarPiglet Word VBA 6 04-23-2018 05:06 AM
Purpose of the 'Mention' field Micromegas Outlook 0 04-11-2016 04:28 PM
Find and list Blank pages in Word document. ndandge Word VBA 4 11-29-2015 09:15 PM
Find first mention of word from list. Mail merge custom labels with double mention of addresses bng Mail Merge 6 05-30-2013 03:00 AM

Other Forums: Access Forums

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