Filter Array Formula Results

jsaluki

New Member
Joined
Aug 17, 2018
Messages
3
Hi,

A B C D
Starting Balance 120.00 150.00 200.00
Net Cashflow 0.00 -80.00 500.00
Ending Balance 120.00 30.00 700.00


I know I can get the whole row returned {0.00, -80.00, 500.00} with the following array formula

=INDEX(B1:D3,MATCH("Net Cashflow",$A:$A,0),0)

But how would I get just the non-zero values returned as a row (i.e. Net Cashflow <> 0)?

Further, my end result is the column numbers that contain non-zero numbers for the Net Cashflow row.

Thanks.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
IF(ISNUMBER(1/INDEX($B$2:$D$4,MATCH("net cashflow",$A$2:$A$4,0),0)),INDEX($B$2:$D$4,MATCH("net cashflow",$A$2:$A$4,0),0))

should deliver the array: {FALSE,-80,500}
 
Upvote 0
Thanks, but ultimately I need the column numbers (or at least the cell addresses) of the array results and the false as the first entry would probably not work.
 
Upvote 0
You did not specify what you want to do with the resulting array...[/QUOT

I'm actually executing the array formula on a spreadsheet using the Spreadsheetgear API and need the column numbers of the non-zero values in the "Net Cashflow" row. So in this case {3, 4}
 
Upvote 0
You did not specify what you want to do with the resulting array...[/QUOT

I'm actually executing the array formula on a spreadsheet using the Spreadsheetgear API and need the column numbers of the non-zero values in the "Net Cashflow" row. So in this case {3, 4}

Control+shift+enter, not just enter, and copy down:

=IFERROR(SMALL(IF(ISNUMBER(1/INDEX($B$2:$D$4,MATCH("net cashflow",$A$2:$A$4,0),0)),COLUMN($B$2:$D$4)),ROWS($1:1)),"")

Try to use the resulting numeric range
 
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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