# Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

1. ## Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Hi there,

I need to rank the data in the way that it numbers/ranks lines of data based on the following criteria:
* Column A - Store Name (A, B, C, D, etc.)
* Column B - Unique ID number (1
* Column C - But only if Criteria says "Yes" in separate column
* Column D - Ranking ???

All details shown in attached picture.

I would really appreciate your help on this.

Kind regards,

Koniu
Excel issue.JPG

2. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Hi,
Please attach your excel file. None of the helpers like to build the data themselves from scratch
See the yellow banner at the top.

3. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Thanks for tip Belinda. I was trying to do that previously but it didn't work. Now it should be all attached.
Again many thanks.

4. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Sort the data => data => sort

first sort on criteria => Z => A

second sort on store => A => Z

d3 =IF(\$C3="no","",COUNTIF(\$C\$3:\$C3,\$C3))

5. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

=IF(C3="No","--",SUMPRODUCT(N(CODE(\$A\$3:\$A\$15)*10^9+\$B\$3:\$B\$15<CODE(A3)*10^9+B3)*(\$C\$3:\$C\$15="Yes"))+1)

6. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Hi Oeldre,

Thank you for your reply and appreciate your help, however I need to achieve the same without the requirement of sorting the data first manually. I need formula to do this automatically and allocate ranking on the set of data where this data is all mixed up.

7. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Hi Bo_Ry,

It seems that this solve my issue and give me the answer that I was looking for.
However, I have got a couple of queries on this:
1. Could you elaborate/explain on your code?
2. I tried to replicate/transfer your formula in my spreadsheet but it seems that I get “Value” error. Any idea why this may be? PS. I do use array formula brackets. 

Kind regards,

KoniuUK

8. ## Re: Excel - Ranking and Sorting the data in alphabetical order and multiply conditions

Please ignore point 2 as I found the issue with my spreadsheet.

There are currently 1 users browsing this thread. (0 members and 1 guests)