# If Array Formula returning the entire "True" Value for each True result

#### Dave12

##### New Member
It's been a few months since I've last used an Array formula and I consider myself fairly well versed in them, but I can't figure this one out!

The array is fairly simple and I've identified the issue is with the IF section returning multiple values for each "True" result, instead of the expected single number so I'm only going to review that portion.

{=SMALL(IF(Sheet19!\$C\$2:\$P\$2=0,ROW(\$1:\$14)),ROW(\$1:\$1))}

Stepping through the formula I get to this stage:

The result I'd normally expect from this would be 1,2,3,4,5,6,7,8,9,10,11,12,, of which the small is currently picking the 1st smallest number.

However the evaluation is not working as I'd expect and giving the following on the next step

Any help appreciated!

### Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

#### Eric W

##### MrExcel MVP
Welcome to the MrExcel forum!

That's because you're comparing columns (C2:P2) with rows (ROW(1:14)). Excel will turn that into a 2-D array. Commas separate columns, semi-colons separate rows, and you can see those in the Evaluate Formula box. You'd probably want to do something like:

Excel Formula:
``{=SMALL(IF(Sheet19!\$C\$2:\$P\$2=0,COLUMN(\$C:\$P)-2),1)}``

#### Dave12

##### New Member
Brilliant - thank you Eric!

It hadn't occurred to me that I'd never done a horizontal Array before!

Replies
2
Views
85
Replies
5
Views
92
Replies
7
Views
154
Replies
0
Views
309
Replies
5
Views
215

Threads
1,130,404
Messages
5,641,940
Members
417,249
Latest member
Quysinboy

### 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

### 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