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
[TABLE="width: 241"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3.314[/TD]
[TD="align: right"]3.587[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2.628[/TD]
[TD="align: right"]2.806[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]8.941[/TD]
[TD="align: right"]8.211[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]5.568[/TD]
[TD="align: right"]5.408[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]7.474[/TD]
[TD="align: right"]7.432[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3.694[/TD]
[TD="align: right"]3.784[/TD]
[/TR]
</tbody>[/TABLE]
Many Thanks
Denton
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
[TABLE="width: 241"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3.314[/TD]
[TD="align: right"]3.587[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2.628[/TD]
[TD="align: right"]2.806[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]8.941[/TD]
[TD="align: right"]8.211[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]5.568[/TD]
[TD="align: right"]5.408[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]7.474[/TD]
[TD="align: right"]7.432[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3.694[/TD]
[TD="align: right"]3.784[/TD]
[/TR]
</tbody>[/TABLE]
Many Thanks
Denton