ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   rank text (https://www.excelbanter.com/excel-discussion-misc-queries/218090-rank-text.html)

duane

rank text
 
I'd like to mimic the RANK function with an array of text values.

Can I get a numerical value from each of a list of names?

For example:

A1 = George Bush
A2 = Barack Obama
A3 = Abraham Lincoln
A4 = James K. Polk

TEXTRANK(A1)=3
TEXTRANK(A2)=2
TEXTRANK(A3)=1
TEXTRANK(A4)=4

Gary''s Student

rank text
 
in B1:

=COUNTIF($A$1:$A$26,"<"&A1)+1 and copy down to display:

George Bush 3
Barack Obama 2
Abraham Lincoln 1
James K. Polk 4

--
Gary''s Student - gsnu200829


"Duane" wrote:

I'd like to mimic the RANK function with an array of text values.

Can I get a numerical value from each of a list of names?

For example:

A1 = George Bush
A2 = Barack Obama
A3 = Abraham Lincoln
A4 = James K. Polk

TEXTRANK(A1)=3
TEXTRANK(A2)=2
TEXTRANK(A3)=1
TEXTRANK(A4)=4


duane

rank text
 
Hm. Well, that certainly was simple! Thanks a ton for replying. I guess I
didn't realize that a text string could be < or than another. I'll
remember that.
By the way, your answer just helped finish a cub scout pinewood derby
utility. Many thanks.

"Gary''s Student" wrote:

in B1:

=COUNTIF($A$1:$A$26,"<"&A1)+1 and copy down to display:

George Bush 3
Barack Obama 2
Abraham Lincoln 1
James K. Polk 4

--
Gary''s Student - gsnu200829


"Duane" wrote:

I'd like to mimic the RANK function with an array of text values.

Can I get a numerical value from each of a list of names?

For example:

A1 = George Bush
A2 = Barack Obama
A3 = Abraham Lincoln
A4 = James K. Polk

TEXTRANK(A1)=3
TEXTRANK(A2)=2
TEXTRANK(A3)=1
TEXTRANK(A4)=4


Gary''s Student

rank text
 
Thank you for the feedback.
--
Gary''s Student - gsnu200829


"Duane" wrote:

Hm. Well, that certainly was simple! Thanks a ton for replying. I guess I
didn't realize that a text string could be < or than another. I'll
remember that.
By the way, your answer just helped finish a cub scout pinewood derby
utility. Many thanks.

"Gary''s Student" wrote:

in B1:

=COUNTIF($A$1:$A$26,"<"&A1)+1 and copy down to display:

George Bush 3
Barack Obama 2
Abraham Lincoln 1
James K. Polk 4

--
Gary''s Student - gsnu200829


"Duane" wrote:

I'd like to mimic the RANK function with an array of text values.

Can I get a numerical value from each of a list of names?

For example:

A1 = George Bush
A2 = Barack Obama
A3 = Abraham Lincoln
A4 = James K. Polk

TEXTRANK(A1)=3
TEXTRANK(A2)=2
TEXTRANK(A3)=1
TEXTRANK(A4)=4



All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com