Extract Specific Number of Characters After a Word

KungFu Keyboard

New Member
Joined
Oct 22, 2016
Messages
26
Hi there,

How do I extract just 3 characters after a specific word in a cell. Below A2 has a bunch of information jammed into 1 cell. I need to grab just the 3 characters after the word "loadsheet". The blah blah blah is a bunch of random junk that i don't need.

[TABLE="width: 500"]
<tbody>[TR]
[TD]description[/TD]
[TD]output[/TD]
[/TR]
[TR]
[TD]loadsheet 001 blah blah blah[/TD]
[TD]001[/TD]
[/TR]
</tbody>[/TABLE]

Regards,
Bernard
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
In your example, it assumes that you are also assuming a single space after your word, which you do not want to include in your 3 character pull.
For an entry in A1, the formula might look something like this:
Code:
=MID(A1,FIND("loadsheet",A1)+LEN("loadsheet")+1,3)
 
Upvote 0
Something like this (assuming there is a blank space that you want to exclude):
Code:
=MID(A1,FIND("loadsheet",A1)-4,3)

Hopefully, these solutions make sense. If you walk through them, the logic should be pretty straightforward.
Let me know if you have any questions about them.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

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