Extract 2...

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,836
Office Version
  1. 2010
Platform
  1. Windows
Hello, can anyone tidy these formulas up for me please... Is there a formula that I could place in the first cell and drag aross the row...?

Excel Workbook
BCDEF
21Record Type:Former Reference:Title:Author:
22Record Type: Memorandum. Former Reference: WP (44) 642. Title: German Leaflet dropped from Flying Bomb. Author: Herbert Morrison.Memorandum.WP (44) 642.German Leaflet dropped from Flying Bomb.Herbert Morrison.
Sheet1
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
This should:

=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A22,":",REPT(" ",LEN($A22))),".",REPT(" ",LEN($A22))),(COLUMNS($A$22:A22)-1)*LEN($A22)*2+LEN($A22),LEN($A22)))
 
Upvote 0
try this:

=TRIM(MID($B22,FIND(C$21,$B22)+LEN(C$21),IF(ISBLANK(D$21),9999,FIND(D$21,$B22)-FIND(C$21,$B22)-LEN(C$21))))
 
Upvote 0
Hi,

Here's another one, formula copied across as far as needed:


Book1
BCDEF
22Record Type: Memorandum. Former Reference: WP (44) 642. Title: German Leaflet dropped from Flying Bomb. Author: Herbert Morrison.MemorandumWP (44) 642German Leaflet dropped from Flying BombHerbert Morrison
Sheet540
Cell Formulas
RangeFormula
C22=TRIM(MID(SUBSTITUTE(SUBSTITUTE($B22,": ",REPT(" ",LEN($B22))),". ",REPT(" ",LEN($B22))),(COLUMNS($B$22:B22)*2-1)*LEN($B22),LEN($B22)))
 
Upvote 0
Hi Gus

An alternative formula which combines your original formulae :-
Code:
=TRIM(MID($B$22,SEARCH(C$21,$B$22)+LEN(C$21),IF(COLUMNS($C$21:C$21)<counta($c$21:$z$21),search(d$21,$b$22)-search(c$21,$b$22)-len(c$21),len($b$22)-search(c$21,$b$22)+len(c$21))))[ code]
in C22 and dragged across.

hth

Sorry, or  should that be Sarri, about Sundays loss to Man City.</counta($c$21:$z$21),search(d$21,$b$22)-search(c$21,$b$22)-len(c$21),len($b$22)-search(c$21,$b$22)+len(c$21))))[>
 
Last edited:
Upvote 0
Gus

The above seems to have mucked up with the editing here is the formula :-
Code:
=TRIM(MID($B$22,SEARCH(C$21,$B$22)+LEN(C$21),IF(COLUMNS($C$21:C$21) < COUNTA($C$21:$Z$21),SEARCH(D$21,$B$22)-SEARCH(C$21,$B$22)-LEN(C$21),LEN($B$22)-SEARCH(C$21,$B$22)+LEN(C$21))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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