Rank then sort then pastelink

S

SueQueen

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?
 
B

Bernd P

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
 
S

SueQueen

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
 
B

Bernd P

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top