Problems with array formula to list rows of a spreadsheet

chrisk67

New Member
Joined
Jan 24, 2017
Messages
6
I am working on a spreadsheet to list people authorised to travel with IT abroad). I am trying to work on a section detailing those whose authority expires in the next 30 days

Column A is the unique identifier
Column B is the days to expiry of authority.
rows B4-B5000 will contain the data

My formula is in cells B5026-B5060. Once I identify the row involved columns C onwards can be a straightforward vlookup for the other details. I have done this before but gotten bogged down so any help would be appreciated.

My formula is
=IFERROR(INDEX(A:A,SMALL(IF($B$4:$B$5000<30,ROW($B$4:$B5000)),ROWS($4:4))),"") (as an array)

I was going to upload the sheet but i dont appear able to upload a copy
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi & welcome to MrExcel.
Try
=IFERROR(INDEX($A$4:$A$5000,SMALL(IF($B$4:$B$5000<30,ROW($B$4:$B$5000)-ROW($B$4)+1),ROWS($1:1))),"")
 
Upvote 0
Thanks for your help. I have got that section sorted but now found that it identifies dates in after the deadline has passed. Can you suggest how I can restrict it to 7 days past the deadline and the same 30 before. I tried playing with IFAND but got bogged down again.
 
Upvote 0
Can you show us a sample of the data in col B showing which should be included.
There are some add-ins available here which allow you to post sample data to the board https://www.mrexcel.com/forum/about-board/508133-attachments.html

I struggle to install add ons as the machine restricts admin level work (dlo or install) so have copied the columns B-D-C etc below. I am trying to identify only IT within 30 days of the deadline (but dont mid going 7 days over)

Days to ExpiryItem (SP or Smart Phone)Device Owner (surname)Device Owner (forename)Device Owner (PID)Device IDReferenceOutbound DateReturn DateAd Hoc (Y/N)6M/12M dispensationExpiry Date
-8Smart PhoneSmithBill123456712341111/1901/01/201902/01/2019 02/01/2019
1Surface ProJonesFred7654321123241212/1901/02/201911/01/2019 11/01/2019
25Smart PhoneJacksonmichael53535379876411213/1902/01/201904/02/2019 04/02/2019
177Surface Protedfather1111111187yyy666/1906/01/201921/01/2019 6 months06/07/2019
6Smart Phonejonesjack6565657rrr5555656/1910/01/201916/01/2019 16/01/2019
22Surface Prostathamjason9876543nnhnhh1234/1910/01/201901/02/2019 01/02/2019

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Ok, try
=IFERROR(INDEX($A$4:$A$5000,SMALL(IF(($B$4:$B$5000<30)*($B$4:$B$5000>-8),ROW($B$4:$B$5000)-ROW($B$4)+1),ROWS($1:1))),"")
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,081
Messages
6,128,696
Members
449,464
Latest member
againofsoul

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