Uh...can this be done?

christianbiker

Active Member
Joined
Feb 3, 2006
Messages
365
Greetings all,

The following formula works great using one column, however is it possible to use it with multiple columns. Here is my current formula:
=IF(COUNTIF(DATABASE!$J$1:$J$500,"Active")>=ROWS($1:1),INDEX(DATABASE!$A$1:$A$500,SMALL(IF(DATABASE!$J$1:$J$500="Active",ROW($1:$500)),ROW(1:1))),"")

Here is what I tried, but couldn't get to work:
=IF(COUNTIF(and(DATABASE!$J$1:$J$500,"Active",DATABASE!$K$1:$K$500,"Yes")>=ROWS($1:1),INDEX(DATABASE!$A$1:$A$500,SMALL(IF(and(DATABASE!$J$1:$J$500="Active",DATABASE!$K$1:$K$500,"Yes"),ROW($1:$500)),ROW(1:1))),"")

I thought this would work more like a sumproduct formula however I am using text, not numbers.

Any assistance would be appreciated...

Chad
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Use multiplication for AND:

=IF((COUNTIF(DATABASE!$J$1:$J$500,"Active")*COUNTIF(DATABASE!$K$1:$K$500,"Yes"))>=ROWS($1:1),INDEX(DATABASE!$A$1:$A$500,SMALL(IF(((DATABASE!$J$1:$J$500="Active")*(DATABASE!$K$1:$K$500="Yes")),ROW($1:$500)),ROW(1:1))),"")

confirmed with Ctrl+Shift+Enter.
 
Upvote 0
Your logic is all wrong in your formula..
The and() formula is first being evaluated between the 4 items in its brackets.Not what you intend to do at all.
 
Upvote 0
TRy this

=IF(ISERROR(SMALL(IF((DATABASE!$J$1:$J$50="Active")*(DATABASE!$K$1:$K$50="Yes"),ROW($1:$50)),ROW(A1))),"",
INDEX(DATABASE!$A$1:$A$500,SMALL(IF((DATABASE!$J$1:$J$50="Active")*(DATABASE!$K$1:$K$50="Yes"),ROW($1:$50)),ROW(A1))))
 
Upvote 0
Andrew & xld:
Thanks for your assistance. Both formulas worked. I definitely wouldn't have figured that out.

I am sure glad there is a forum such as this that provides real assistance!



sijpie:
Gee...Thanks for the insight, or lack thereof...

If I was getting the intended result I wouldn't be here asking for help would I? My logic is based on my limited knowledge of Excel and I couldn't figure it out.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,309
Members
449,080
Latest member
jmsotelo

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