# Convert Ordinal to Cardinal number with the help of Formula or VBA code.

Regular Contributor

# Convert Ordinal to Cardinal number with the help of Formula or VBA code.

Hello

How to Convert Ordinal number to Cardinal Number with the help of Formula or VBA?

Like -

1st -- 1

2nd -- 2

3rd -- 3

and so on.

5 Replies

# Re: Convert Ordinal to Cardinal number with the help of Formula or VBA code.

@Zan_Hanifee Perhaps like this?

# Re: Convert Ordinal to Cardinal number with the help of Formula or VBA code.

Yes sir... You are correct

Sir what if i want to change to -

22nd Dec - 22-Dec-2021(in date format)

# Re: Convert Ordinal to Cardinal number with the help of Formula or VBA code.

@Zan_Hanifee Not pretty, but like this:

``=VALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B13,"st ","-"),"nd ","-"),"rd ","-"),"th ","-"))``

# Re: Convert Ordinal to Cardinal number with the help of Formula or VBA code.

Thank you so much sir

# Re: Convert Ordinal to Cardinal number with the help of Formula or VBA code.

@Zan_Hanifee You're welcome!