Making a Formula that returns arrays skip the 0's

Denton1234

New Member
Joined
Jul 3, 2017
Messages
1
Hello,

I would like a formula that returns an array, that satisfies the is statement Column A = 2 - BUT I would like to skip the blanks

={N(OFFSET($B$1:$B$100,SMALL(IF($A$1:$A$100=2,ROW($B$1:$B$100)),ROW(INDIRECT("1:"&COUNTIF($B$1:$B$100,2)))),0))}

This gives me almost what I want, but it also gives me 0's when a 2 in column A matches a Blank cell in column B.

Is there a way to skip the blanks? So return an array of non 0 numbers If column A = 2



A B C
1
2
1
2
1
23.3143.587
1
22.6282.806
1
2
18.9418.211
25.5685.408
17.4747.432
23.6943.784

<tbody>
</tbody>


Many Thanks
Denton
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about this:

- Assuming you're in Excel 2010, click the File button in the top left, then choose Options, then choose Advanced, then scroll down to Display options for this worksheet, ensure the worksheet you want to make the change to is selected in the dropdown menu, then uncheck the "Show a zero in cells that have a zero value"

Assuming you don't have any other cells that have a value of 0 that you actually need/want to display, this should accomplish exactly what you want without making your formula needlessly complicated.
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,337
Members
448,568
Latest member
Honeymonster123

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