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 Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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