Return row numbers with mutiple criteria

foreveryone

New Member
Joined
Apr 20, 2018
Messages
8
Hi. I'm trying to build a few tables using named ranges and array formulae but have hit a snag, hoping someone can help.

My strategy is to return the row numbers in a data table that match certain conditions and then use these in an INDEX function to return the data. My formula for the row numbers is:

{=SMALL(IF(Status="Follow-up",ROW(Status)),ROW())}

which I'll copy down a column. Status is a named range in this example.

What I'd like to do is add an OR condition to the IF so I can return rows where Status="Follow-up" or "Something else". Just thinking as I type, I guess I can add the conditions together somehow? I guess all I'm looking for is a single column of 0s and 1s to pass to the ROW function..

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Actually figuring this out now, perhaps a bit too soon in posting..

This works for the row numbers:

{=SMALL(IF(Status="Follow-up",ROW(Status))+IF(Status="Something else",ROW(Status)),ROW())}

Just need to find a way of coercing the 0s to errors as otherwise the SMALL function returns them. Guess I can switch to LARGE?

Sorry to answer my own questions - any alternatives or suggestions still gratefully received.
 
Upvote 0
Hi Foreveryone,

Use this formula. Note that only one if is used. It creates row number if A or B is true. On other hand, if both are false, it creates 'FALSE' (not zero). So the formula should work.

=SMALL(IF(($A$1:$A$8="A")+($A$1:$A$8="B"),ROW($A$1:$A$8)),ROW())


Please let me know you go.

Kind regards

Saba
 
Upvote 0

Forum statistics

Threads
1,215,619
Messages
6,125,871
Members
449,267
Latest member
ajaykosuri

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