a text formula that i cant crack!

monsierexcel

New Member
Joined
Nov 19, 2018
Messages
29
I am trying to make a formula which basically says "find the first word that starts with G then choose the word AFTER it" but i cant configure the formula correctly, i am a bit of a novice!
i can do it by combining IF statementslike this:

=IF(TRIM(LEFT(SUBSTITUTE(MID(B4,FIND("G",B4),LEN(B4))," ",REPT(" ",100)),100))="G",TRIM(LEFT(SUBSTITUTE(MID(B4,FIND("G",B4),LEN(B4))," ",REPT(" ",100)),100))&" "&E4,TRIM(LEFT(SUBSTITUTE(MID(B4,FIND("G",B4),LEN(B4))," ",REPT(" ",100)),100)))


but not in one formula.

example text: Bobs Golden Ticket
I want the word "ticket" to show in my formula.

thank you for your help!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
what if:

Greg Smith Ticket ==> Smith or Ticket ?
Gregs Golden Ticket ==> ???
Mark Train Green ==> ???

more representative example with expected result, please
 
Last edited:
Upvote 0
Hi,

Use B1 formula for in case your 1st G word may Not be Capitalized.
Use C1 formula, references E1 (user input) for nth word of your choice starting at 1st G word.


Book1
ABCDE
1Bobs Golden Ticket abc def ghiTicketdefnth word starting at 1st G word4
2Greg Smith Ticket abc def ghiSmithabc^^ user input
3Gregs Golden Ticket abc def ghiGoldenabc
4Mark Train Green
5A good samaritan abc def ghisamaritandef
6bring Goodies abc def ghiabcghi
7bring girl scout cookies abc def ghiscoutabc
Sheet426
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE(MID(" "&A1,SEARCH(" G"," "&A1),255)," ",REPT(" ",100)),200,100))
C1=TRIM(MID(SUBSTITUTE(MID(" "&A1,SEARCH(" G"," "&A1),255)," ",REPT(" ",100)),E$1*100,100))
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top