EXCLUDE ZERO FROM SUMIFS AND MEDIAN IF

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
442
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

Please see below, hope you can help.

Thanks

Is there a way to exclude ZEROS in column V
=MEDIAN(IF('Relevant Employees'!B:B="Male",'Relevant Employees'!V:V))

Is there a way to exclude ZEROS in column U
=SUMIFS('Relevant Employees'!U:U, 'Relevant Employees'!B:B, "Male", 'Relevant Employees'!AB:AB,"Y")/B8
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I'd say using FILTER is a good option here. Something along the lines of:

Excel Formula:
=MEDIAN(FILTER('Relevant Employees'!V:V,('Relevant Employees'!V:V<>0)*('Relevant Employees'!B:B="Male")))

And:

Excel Formula:
=SUM(FILTER('Relevant Employees'!U:U,('Relevant Employees'!AB:AB="Y")*('Relevant Employees'!B:B="Male")*('Relevant Employees'!U:U<>0)))/B8

You may be able to rework this to exclude whole column from the calculation based on how your data looks (which I don't know at the moment)
 
Upvote 0
Solution
Why would you need to exclude 0 from a sum calculation?
 
Upvote 0
I'd say using FILTER is a good option here. Something along the lines of:

Excel Formula:
=MEDIAN(FILTER('Relevant Employees'!V:V,('Relevant Employees'!V:V<>0)*('Relevant Employees'!B:B="Male")))

And:

Excel Formula:
=SUM(FILTER('Relevant Employees'!U:U,('Relevant Employees'!AB:AB="Y")*('Relevant Employees'!B:B="Male")*('Relevant Employees'!U:U<>0)))/B8

You may be able to rework this to exclude whole column from the calculation based on how your data looks (which I don't know at the moment)
Thanks very much
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,011
Members
449,204
Latest member
tungnmqn90

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