Excel Rank with MANY conditions skip ranks. Please help. my head is spinning

teddybear2018

New Member
Joined
Aug 26, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
This formula below was working
=IF(AP22="","N/A",IF(AP22="0","N/A",SUMPRODUCT(--($D$4:$D$387=D22),--($AP$4:$AP$387<>"")*(AP22<$AP$4:$AP$387)/COUNTIF($AP$4:$AP$387,$AP$4:$AP$387&""))+1))

NOW I had to add an additional condition, now it skips ranks. I no longer have rank 1 or 3,4. it just skips numbers

=IF(G36="Tech","N/A",IF(AP36="","N/A",IF(AP36="0","N/A",SUMPRODUCT(--($D$4:$D$387=D36),--($AP$4:$AP$387<>"")*(AP36<$AP$4:$AP$387)/COUNTIF($AP$4:$AP$387,$AP$4:$AP$387&""))+1)))

I just wanted to exclude tech dept.
If G36 is tech, or AP=36 is blank or 0 come back as "N/A", but the rest please rank. and NOT skip numbers
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Maybe

=IF(G36="Tech","N/A",IF(AP36="","N/A",IF(AP36="0","N/A",SUMPRODUCT(--($G$4:$G$387<>"Tech"),--($D$4:$D$387=D36),--($AP$4:$AP$387<>"")*(AP36<$AP$4:$AP$387)/COUNTIFS($AP$4:$AP$387,$AP$4:$AP$387&"",$G$4:$G$387,"<>Tech"))+1)))

Such formulas always get messy once you start trying to add bits to them.

I suspect that this could return #DIV/0! errors, but without sample data and expected results to test on this is about as good as it gets.

Please post any data samples using XL2BB (Not screen captures), remember to fictionalise any personal / confidential details before posting and type in the expected results for the sample so that we know what we are aiming for.

 
Last edited:
Upvote 0
Thank you for the suggestion. I want to this but I guess its not complete formula
I can't close the formula to try. Its not the extra ")" at the end. What could I be missing?
 
Upvote 0
The formula closes fine for me, maybe you didn't copy it correctly?
 
Upvote 0
I thought that might happen, see post 2 (the bit below the formula).
 
Upvote 0
Scroll up, it's the reply with the formula.

You could try changing the formula slightly, but I don't think that it will give the correct results.

=IF(G36="Tech","N/A",IF(AP36="","N/A",IF(AP36="0","N/A",SUMPRODUCT(--($G$4:$G$387<>"Tech"),--($D$4:$D$387=D36),--($AP$4:$AP$387<>"")*(AP36<$AP$4:$AP$387)*COUNTIFS($AP$4:$AP$387,$AP$4:$AP$387&"",$G$4:$G$387,"<>Tech"))+1)))

But without the additional information that I asked for in post 2 your formula is too much of a mess to break down and make sense of.
 
Upvote 0
=IF(G36="Tech","N/A",IF(AP36="","N/A",IF(AP36="0","N/A",SUMPRODUCT(--($G$4:$G$387<>"Tech"),--($D$4:$D$387=D36),--($AP$4:$AP$387<>"")*(AP36<$AP$4:$AP$387)/COUNTIFS($AP$4:$AP$387,$AP$4:$AP$387&"",$G$4:$G$387,"<>Tech"))+1)))

Are you referring to this? This isn't working for me...
 
Upvote 0
yea I guess it's too much... I will manually work around it. thanks so much for your help!
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,460
Members
448,965
Latest member
grijken

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