return the second text value

Rubber Beaked Woodpecker

Board Regular
Joined
Aug 30, 2015
Messages
203
Office Version
  1. 2021
Hi

I use the following formula to return the first text value from a range.

{=INDEX(AB9:AB24,MATCH(TRUE,ISTEXT(AB9:AB24),0))}

My question is, would it be possible to modify the formula to return the second text value from the same range?

Many thanks

RBW
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi

I use the following formula to return the first text value from a range.

{=INDEX(AB9:AB24,MATCH(TRUE,ISTEXT(AB9:AB24),0))}

My question is, would it be possible to modify the formula to return the second text value from the same range?

Many thanks

RBW
OK

It appears this is the solution {=INDEX(AB9:AB24,MATCH(TRUE,ISTEXT(AB9:AB24),1))}

However this now brings me to my next problem in how to return the third text value!

This possible please?

RBW
 
Upvote 0
Hi,
You could use a first Match to find the number of the first line with text then use that in addition of your starting line (9th) to make an adresse used in the following match so it start at the line under the first result) like so;
{=INDEX(AB9:AB24,MATCH(TRUE,ISTEXT(INDIRECT(ADDRESS(MATCH(TRUE,ISTEXT(AB9:AB24),0)+9;28))),0))}

Untested might have to tweak numbers by 1 or 2...
Edit to clarify: The +9 in the formula refer to your first line of range (AB9) then the 28 refer to the column: AB
 
Upvote 0
Perhaps:
=INDEX(AB:AB,SMALL(IF(ISTEXT($AB$9:$AB$24),ROW($AB$9:$AB$24),""),ROW(A1)))

Copy down.

textvalues.xlsx
ABACAD
9abcabc
10def
11ghi
12def
13
14
15ghi
16
Sheet1
Cell Formulas
RangeFormula
AD9:AD11AD9=INDEX(AB:AB,SMALL(IF(ISTEXT($AB$9:$AB$24),ROW($AB$9:$AB$24),""),ROW(A1)))
 
Last edited:
Upvote 0
For formula in #4:
Its an array formula, since excel 2016, then need to be confirmed with Ctrl-Shift-Enter combination.
 
Upvote 0
Another option is
Excel Formula:
=INDEX(AB:AB,AGGREGATE(15,6,ROW($AB$9:$AB$24)/ISTEXT($AB$9:$AB$24),ROWS(A$1:A1)))
dragged down.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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