Array formula: return data from adjacent column?

suppersong

New Member
Joined
Jul 4, 2022
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
Hi,

Simple question, I hope. I'm using an array formula to return search results from $D$1 to column F (see below). The array formula is:
=INDEX($B$1:$B$5000,SMALL(IF(ISNUMBER(SEARCH($D$1, $B$1:$B$5000)),ROW($B$1:$B$5000)-ROW($B$1)+1),E2))

How do I get the formula to return the corresponding dates from column C to column G?

1656957330226.png
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi & welcome to MrExcel.
How about
Excel Formula:
=INDEX($C$1:$C$5000,AGGREGATE(15,6,(ROW($B$1:$B$5000)-ROW($B$1)+1)/(ISNUMBER(SEARCH($D$1, $B$1:$B$5000))),ROWS(G$2:G2)))
You could also use
Excel Formula:
=INDEX($B$1:$B$5000,AGGREGATE(15,6,(ROW($B$1:$B$5000)-ROW($B$1)+1)/(ISNUMBER(SEARCH($D$1, $B$1:$B$5000))),ROWS(F$2:F2)))
both of these are "normal" formulae & don't need array entry
 
Upvote 0
Solution
Thank you! for both those suggestions. Exactly what I needed. I was having trouble getting the AGGREGATE function to work. I don't know why, but your code did the trick.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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