FILTER problem

sharshra

Active Member
Joined
Mar 20, 2013
Messages
391
Office Version
  1. 365
I´m using FILTER function. It returns 0 when there is no value. I have used the optional [if empty], but still get 0. I´m sure it must be some trivial mistake by me. Can the experts help please?

Source table:
excel problems.xlsx
BC
2namedept
3abcfinance
4bcdhr
5cdeprocurement
6defsales
7abcsales
8hr
9mnosecurity
10procurement
11hr
12efgfinance
filter


Filter:
excel problems.xlsx
EF
3bcdhr
40hr
50hr
filter
Cell Formulas
RangeFormula
E3:F5E3=FILTER($B$3:$C$12,$C$3:$C$12="hr","no name")
Dynamic array formulas.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello, the optional argument refers to the situation when there is nothing to return. The result could be obtained e.g. like:

Excel Formula:
=IF(FILTER($B$3:$C$12,$C$3:$C$12="hr")="","no name",FILTER($B$3:$C$12,$C$3:$C$12="hr"))
 
Upvote 1
Thanks, @hagia_sofia for quick response. I'm using IF function to get the desired output. But I thought optional argument [if empty] is meant for doing this instead of using a lengthy IF formula. Is there any reason why [if empty] is not working?
 
Upvote 0
Perhaps one of these?

24 10 12.xlsm
BCDEFGHI
2namedept
3abcfinancebcdhrbcdhr
4bcdhrhrno namehr
5cdeprocurementhrno namehr
6defsales
7abcsales
8hr
9mnosecurity
10procurement
11hr
12efgfinance
Filter
Cell Formulas
RangeFormula
E3:F5E3=FILTER($B$3:$C$12,$C$3:$C$12="hr","")&""
H3:I5H3=FILTER(IF(B3:C12="","no name",B3:C12),C3:C12="hr","")
Dynamic array formulas.
 
Upvote 0
Solution
Is there any reason why [if empty] is not working?
The if empty argument for the FILTER function is for if the whole filter result is empty (that is nothing is returned by the whole filter), not if particular cells in the filtered range are empty.
 
Upvote 1
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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