Alteration to formula with additional argument

StellaArtois

New Member
Joined
Jan 10, 2024
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Happy new year to everyone!

I wonder if i may ask for some help please

I have the following formula, which works for a single argument BD1 but i need to include BD2 also, so it returns both BD1 and BD2 results

=IFERROR(INDEX($BD$5:$BD$502,SMALL(IF($AC$5:$AC$502=$BG$1,IF($U$5:$U$502=$BD$2,ROW($AA$5:$AA$502)-ROW($AA$5)+1)),ROWS(BH$5:BH5))),"")

Many thanks in advance
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Seems that formula reacts now on BD2, not BD1. Anyway ... how about:
Excel Formula:
=IFERROR(INDEX($BD$5:$BD$502,SMALL(IF($AC$5:$AC$502=$BG$1,IF(($U$5:$U$502=$BD$2)+($U$5:$U$502=$BD$1),ROW($AA$5:$AA$502)-ROW($AA$5)+1)),ROWS(BH$5:BH5))),"")
 
Upvote 0
I assume that formula is to be copied down? Since you have Excel 365 what about this in the top cell and delete all the formulas below and it should return all the relevant results without needing to copy down.

Excel Formula:
=FILTER(BD5:BD502,(AC5:AC502=BG1)*((U5:U502=BD1)+(U5:U502=BD2)),"")

Here is my sample data and results

25 01 03.xlsm
UACBDBEBFBGBH
16a
23
3
4
59bBD5BD6
66aBD6BD9
73bBD7BD10
83cBD8BD11
93aBD9BD15
106aBD10BD16
116aBD11
129bBD12
139bBD13
146cBD14
153aBD15
163aBD16
176bBD17
189aBD18
19
Filter
Cell Formulas
RangeFormula
BH5:BH10BH5=FILTER(BD5:BD502,(AC5:AC502=BG1)*((U5:U502=BD1)+(U5:U502=BD2)),"")
Dynamic array formulas.
 
Last edited:
Upvote 0
Wow Peter_SSs,

That is awesome, thanks
Does this formula return text also?

Thanks for your answer Kaper
 
Upvote 0
Does this formula return text also?
It already does in my sample above.
.. or do I not understand your question?

Alternatively, why not just try it with whatever example/data you are thinking of? ;)
 
Upvote 0

Forum statistics

Threads
1,225,628
Messages
6,186,106
Members
453,337
Latest member
fiaz ahmad

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