[Excel Vba] detect a word in a string
Solved
MattDF
Posted messages
76
Status
Membre
-
#YOLOSWAG -
#YOLOSWAG -
Hello,
I have created 2 macros for one of the offices at my company. I would like to combine them into a single one to avoid manipulation errors.
The first macro is for one type of client, and the second for the other type. It is possible to determine which client is concerned by the presence of a word in a specific cell's string.
To combine the 2 macros, I would need a formula that detects the presence of this word in the cell and triggers the appropriate macro accordingly.
Let's say I have a cell named "TOTO" that contains the phrase "why doesn’t my Excel formula want to work?". I need a macro formula that can tell me if the TOTO cell contains the word "want"
(You probably guessed that this is just an example)
Thank you for your help. :)
I have created 2 macros for one of the offices at my company. I would like to combine them into a single one to avoid manipulation errors.
The first macro is for one type of client, and the second for the other type. It is possible to determine which client is concerned by the presence of a word in a specific cell's string.
To combine the 2 macros, I would need a formula that detects the presence of this word in the cell and triggers the appropriate macro accordingly.
Let's say I have a cell named "TOTO" that contains the phrase "why doesn’t my Excel formula want to work?". I need a macro formula that can tell me if the TOTO cell contains the word "want"
(You probably guessed that this is just an example)
Thank you for your help. :)
Configuration: Windows XP Firefox 2.0.0.13
inStr(range("TOTO"),"veut"))It seems to me that it works.