Extract 2...

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,886
Office Version
  1. 365
Platform
  1. Windows
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

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,872
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
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

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
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)))

Thank you very much steve the fish...!
 
Upvote 0

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
ADVERTISEMENT
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))))

Thank you too bobsan42...
 
Upvote 0

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
7,245
Office Version
  1. 2016
Platform
  1. Windows
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

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
ADVERTISEMENT
Thanks jtakw...
 
Upvote 0

ukmikeb

Well-known Member
Joined
Jul 10, 2009
Messages
2,757
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

ukmikeb

Well-known Member
Joined
Jul 10, 2009
Messages
2,757
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,195,632
Messages
6,010,788
Members
441,569
Latest member
PeggyLee

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
Top