# Using AND in complicated look up feature

#### Lball

##### Board Regular
Hi All,

I am using a formula to search a saved chart of data to find the number of times an item appears in the chart. I used the following formula to get started...

=IF(ISERROR(INDEX(Chart,SMALL(IF(Fico<=\$A\$3,ROW(Fico)),ROW(1:1)),5)),"",INDEX(Chart,SMALL(IF(Fico<=\$A\$3,ROW(Fico)),ROW(1:1)),5))

Chart=whole data array
Fico=Column A of Chart
DocTYpe=Column B of Chart

I used A3 as input to find number times of occurance and list column E of chart for each occurance. It works great.

Here's my question...I really want this to be a search engine for the number of times my input boxes (A3 and B3) both occur at the same time in the Chart. Example: A3=620 and B3=SIVA, i want to print out the data in column 5 of chart for all matches of 620 to Fico and SIVA to DocType.
Anyone have an idea of how to integrate AND or another way to get the same results???

### Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

#### acw

##### MrExcel MVP
Hi

Think I have the cell references and named ranges correct.
Assumes the output is going into Row 1.

=INDEX(chart!E:E,SMALL(IF((FICO=\$A\$#)*(DocType=\$B\$3),ROW(FICO),65536),ROW()))
array entered (ctrl, shift enter)

Format the cell as Format, Cell, Number, Custom,#;#;""

copy down as required.

Tony

#### Lball

##### Board Regular
Thank you for your input. I am having problems with the formula. It doesn't like the \$A\$#. Then i broke the formula down further to test areas, and its this part that doesn't work. First i have to change the "#" to something so i use a 3. I am getting a Num# error

SMALL(IF((FICO=\$A\$#)*(DocType=\$B\$3),ROW(FICO),65536),ROW()))

I'm trying to trouble shoot, but i don't know the reasoning behind \$A\$# or the * between the two. Can you send some more info. Or if i can help define things better i will. Please let me know.

##### MrExcel MVP
Lball said:
Hi All,

I am using a formula to search a saved chart of data to find the number of times an item appears in the chart. I used the following formula to get started...

=IF(ISERROR(INDEX(Chart,SMALL(IF(Fico<=\$A\$3,ROW(Fico)),ROW(1:1)),5)),"",INDEX(Chart,SMALL(IF(Fico<=\$A\$3,ROW(Fico)),ROW(1:1)),5))

Chart=whole data array
Fico=Column A of Chart
DocTYpe=Column B of Chart

I used A3 as input to find number times of occurance and list column E of chart for each occurance. It works great.

Here's my question...I really want this to be a search engine for the number of times my input boxes (A3 and B3) both occur at the same time in the Chart. Example: A3=620 and B3=SIVA, i want to print out the data in column 5 of chart for all matches of 620 to Fico and SIVA to DocType.
Anyone have an idea of how to integrate AND or another way to get the same results???

Which cell house the first instance of this non-robust formula? Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

### Forum statistics

1,163,993
Messages
5,834,772
Members
430,320
Latest member
Napzz ### 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.

### Which adblocker are you using?    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

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