![]() |
Rank then sort then pastelink
I have 9 topics (ColumnA) with a tallied numerical answer(ColumnB) in Excel.
I have used the RANK function in Excel to Rank numerical responses from 1 to 9 in Column C. After that I need to sort them by the rank to be displayed with the Rank Number and Topic name in Column D only to then have it paste-linked to a word document. I think I need a macro. Can you help? |
Rank then sort then pastelink
Hello,
If you like to sort with worksheet functions: http://www.sulprobil.com/html/sorting.html I would also suggest to use the COUNTIF() + COUNTIF() formula approach instead of RANK because you might face identical sort keys or (in other tasks) non-numerical sort keys for which RANK would not work. Regards, Bernd |
Rank then sort then pastelink
Ok if I were to use the COUNTIF. How would I do that?
Example below. Yeah the problem with RANK is that in the 3rd column where I want to list the fruits by descending order based on the tally, 25 is for banana and apple but it will just list banana 2 times. Some help with the formula for COUNTIF please :) Fruit Tally banana 25 carrot 23 fig 24 apple 25 orange 19 peach 1 "Bernd P" wrote: Hello, If you like to sort with worksheet functions: http://www.sulprobil.com/html/sorting.html I would also suggest to use the COUNTIF() + COUNTIF() formula approach instead of RANK because you might face identical sort keys or (in other tasks) non-numerical sort keys for which RANK would not work. Regards, Bernd |
Rank then sort then pastelink
Hello Sue,
If your fruit data resides in A2:A7 and the count data in B2:B7 then enter into C2 (C being a helper column): =COUNTIF($B$2:$B$7,""&B2)+COUNTIF($B$2:B2,B2) and copy down to B7. Please note the correct "$" chars! Enter into D2: =INDEX($B$2:$B$7,MATCH(ROW()-1,$B$2:$B$7,)) and copy down. Enter into E2: =INDEX($A$2:$A$7,MATCH(ROW()-1,$B$2:$B$7,)) and copy down again. Regards, Bernd |
Rank then sort then pastelink
Got it. great. thanks
"Bernd P" wrote: Hello Sue, If your fruit data resides in A2:A7 and the count data in B2:B7 then enter into C2 (C being a helper column): =COUNTIF($B$2:$B$7,""&B2)+COUNTIF($B$2:B2,B2) and copy down to B7. Please note the correct "$" chars! Enter into D2: =INDEX($B$2:$B$7,MATCH(ROW()-1,$B$2:$B$7,)) and copy down. Enter into E2: =INDEX($A$2:$A$7,MATCH(ROW()-1,$B$2:$B$7,)) and copy down again. Regards, Bernd |
All times are GMT +1. The time now is 05:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com