# Extract 2...

#### How_Do_I

##### Well-known Member
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
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)))

#### bobsan42

##### Well-known Member
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))))

#### How_Do_I

##### Well-known Member
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...!

#### How_Do_I

##### Well-known Member
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...

#### jtakw

##### Well-known Member
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)))

Thanks jtakw...

You're welcome.

#### ukmikeb

##### Well-known Member
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:

#### ukmikeb

##### Well-known Member
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:

Replies
1
Views
544
Replies
4
Views
332
Replies
4
Views
5K
Replies
1
Views
622
Replies
4
Views
1K

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.

### Which adblocker are you using?

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

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