Formula for PLACES not displaying the "TH" Places like 45th Place it comes out 45 Place

RudeBoy

Active Member
Joined
Feb 2, 2003
Messages
376
In excel I have a formula displaying places
ie !st Place, 2nd Place 3rd Place etc

The formula is like this:
=D46&MID("thstndrdth",MIN(100,2*RIGHT(D46)*(MOD(D46-11,100)>2)+1),2)&" Place"

The problem I am encountering is that the "TH" places are not displaying like this:
45 Place
46 Place
47 Place
48 Place
49 Place
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
In excel I have a formula displaying places
ie !st Place, 2nd Place 3rd Place etc

The formula is like this:
=D46&MID("thstndrdth",MIN(100,2*RIGHT(D46)*(MOD(D46-11,100)>2)+1),2)&" Place"

The problem I am encountering is that the "TH" places are not displaying like this:
45 Place
46 Place
47 Place
48 Place
49 Place
That method for finding the ordinal suffix does not look right to me (I use 9 in place of that first 100). Try it like this...

=D46&MID("thstndrdth",MIN(9,2*RIGHT(D46)*(MOD(D46-11,100)>2)+1),2)&" Place"
 
Upvote 0
That method for finding the ordinal suffix does not look right to me (I use 9 in place of that first 100). Try it like this...

=D46&MID("thstndrdth",MIN(9,2*RIGHT(D46)*(MOD(D46-11,100)>2)+1),2)&" Place"

That Worked Thanks..

Only fall out is st has a space in front
So every st place has a space like this EXCEPT 1st.

1st is fine then 21 st, 31 st all have spaces but that is no big deal :) Thanks
 
Upvote 0
That Worked Thanks..

Only fall out is st has a space in front
So every st place has a space like this EXCEPT 1st.

1st is fine then 21 st, 31 st all have spaces but that is no big deal :) Thanks
:confused: The formula I posted, as I posted it, has no space between the number and the ordinal suffix for any number in cell D46. Did you modify the formula I posted? If so, show us what you are now using.
 
Last edited:
Upvote 0
:confused: The formula I posted, as I posted it, has no space between the number and the ordinal suffix for any number in cell D46. Did you modify the formula I posted? If so, show us what you are now using.

=D27&MID("thstndrdth",MIN(9,2*RIGHT(D27)*(MOD(D27-11,100)>2)+1),2)&" Place"

Here is the code but maybe it just looks like a space
as that font is big. I did a copy & paste in notepad & I do not see a space so its just the font so we are good thanks :)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

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