Return Multiple Values Horizontally - INDEX/IF/ROW/SMALL?

Fyresparxx

New Member
Joined
Mar 21, 2014
Messages
18
I'm trying to set up a quick reference list and I need to list equipment across the page based on their status.

- Column A lists what room the equipment is in.
- An "X" in B indicates that the equipment is down.
- C lists the name of the piece of equipment.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]RM1[/TD]
[TD][/TD]
[TD]EQPT1[/TD]
[TD][/TD]
[TD]Check:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]RM1[/TD]
[TD]X[/TD]
[TD]EQPT2[/TD]
[TD][/TD]
[TD]EQPT2[/TD]
[TD]EQPT3[/TD]
[TD]EQPT5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]RM1[/TD]
[TD]X[/TD]
[TD]EQPT3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]RM1[/TD]
[TD][/TD]
[TD]EQPT4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]RM1[/TD]
[TD]X[/TD]
[TD]EQPT5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]RM1[/TD]
[TD][/TD]
[TD]EQPT6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]RM2[/TD]
[TD][/TD]
[TD]EQPT7[/TD]
[TD][/TD]
[TD]Check:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]RM2[/TD]
[TD]X[/TD]
[TD]EQPT8[/TD]
[TD][/TD]
[TD]EQPT8[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]RM2[/TD]
[TD][/TD]
[TD]EQPT9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]RM3[/TD]
[TD][/TD]
[TD]EQPT10[/TD]
[TD][/TD]
[TD]ALL GOOD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
My actual sheet is much longer, and the room numbers are each a merged cell, color coded and numbered in A.

Basically, on the first line for each room I have an "IF" function that essentially says "good" or "check." That works.
Underneath I HAD an INDEX formula copied across the page that listed each piece of that room's equipment by name if it was due for maintenance, and it showed up like my example above. Some of these rooms have 30 or so pieces of equipment in them, and there are several rooms in the facility.

My formula got deleted and I can NOT figure out how I did it again. I need to check B for "X" and return all C values in a row.

The old formula was an INDEX formula using ROW and SMALL to return multiple values, but I can't figure it out again.

I do not want to enter a bunch of "IF(B="x"),C" formulas; That could result in a piece of equipment listing off the page and being missed. the point of this sheet is to have an "at a glance" look at what needs maintenance.
 
MIN has nothing to do with it...

=IFERROR(INDEX($C$1:$C$10,SMALL(IF($B$1:$B$10="x",ROW($C$1:$C$10)-ROW($C$1)+1),COLUMNS($A:A))),"")

will also succeed...

I guess I should clarify. I once had a working formula. It used MIN. This time when I was trying to recreate it I kept thinking I was forgetting about something. I'm pretty sure I was thinking about MIN because I used it before. While I was trying to fix it this time I seemed to be going in circles with formulas similar to FDibbins suggestion, not getting results consistently and becoming frustrated by it.
 
Upvote 0
I guess I should clarify. I once had a working formula. It used MIN. This time when I was trying to recreate it I kept thinking I was forgetting about something. I'm pretty sure I was thinking about MIN because I used it before. While I was trying to fix it this time I seemed to be going in circles with formulas similar to FDibbins suggestion, not getting results consistently and becoming frustrated by it.

Where/in which cell do you implement the first instance of this formula?
 
Upvote 0

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