COUNTIF in a list that contains numbers formatted as text

HMSTPI

New Member
Joined
Jul 31, 2017
Messages
18
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!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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!!
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,085
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top