COUNTIF in a list that contains numbers formatted as text

HMSTPI

New Member
Joined
Jul 31, 2017
Messages
11
Excel 2013 64-Bit: I have a list of text that will NOT count correctly (to get the alphabetical order) and, for the first time I know of, I am unable to find any previous discussion anywhere that is relevant.
ABCD
1ITEMORDERFORMULATEXTCORRECT ORDER
21062287
0=COUNTIF($A$2:$A$6,"<="&$A2)1
31062740 Folio
2=COUNTIF($A$2:$A$6,"<="&$A3)2
41063209 Part
3=COUNTIF($A$2:$A$6,"<="&$A4)3
51063648
0=COUNTIF($A$2:$A$6,"<="&$A5)4
61063832 Folio5=COUNTIF($A$2:$A$6,"<="&$A6)5

<tbody>
</tbody>



Column A and the values within are formatted as TEXT.. When that alone didn't work, I added ' to the beginning of the text in A2 and A5. The ORDER will NOT calculate correctly no matter what I try because it insists on treating A2 and A5 as values. Any suggestions other than adding space or concatenating it with another text value (which I already confirmed does work but SHOULDN'T BE NECESSARY)?

Thanks!
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

HMSTPI

New Member
Joined
Jul 31, 2017
Messages
11
Neither option seem to give the right answer. I ended up having to create a different field to concatenate some text in front of the real sorting target to get it to work. All the years I've worked with Excel -- the text/number/number/text inconsistencies and/or auto-treatment STILL finds a new way to drive me crazy!!! :ROFLMAO:

THANKS for such a quick response though I had already moved on and took this long to reply!!
 

Watch MrExcel Video

Forum statistics

Threads
1,102,282
Messages
5,485,849
Members
407,521
Latest member
marita

This Week's Hot Topics

Top