+ Reply to Thread
Results 1 to 9 of 9

Vba required to remove Ordinal suffix from the numbers

  1. #1
    Forum Contributor
    Join Date
    12-12-2017
    Location
    india
    MS-Off Ver
    2013
    Posts
    196

    Vba required to remove Ordinal suffix from the numbers

    Hi Friends,
    i have a task to remove the Ordinal from the Numbers from the range D3:D1000

    example:
    1st Ave
    22nd Street
    33rd Avenue
    100th St

    has to be changes as:
    1 Ave
    22 Street
    33 Avenue
    100 St


    Thanks in Advance.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Vba required to remove Ordinal suffix from the numbers

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-12-2017
    Location
    india
    MS-Off Ver
    2013
    Posts
    196

    Re: Vba required to remove Ordinal suffix from the numbers

    Sir,
    Thanks for looking on my post,
    i tried with your code, but its removing all the valid characters from the range,
    could you please check it, i have attached the Excel file.

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Vba required to remove Ordinal suffix from the numbers

    That's because your data & the samples you posted originally are completely & utterly different.
    Unfortunately I cannot help with your real data.

  5. #5
    Forum Contributor
    Join Date
    12-12-2017
    Location
    india
    MS-Off Ver
    2013
    Posts
    196

    Re: Vba required to remove Ordinal suffix from the numbers

    Quote Originally Posted by Fluff13 View Post
    That's because your data & the samples you posted originally are completely & utterly different.
    Unfortunately I cannot help with your real data.
    okay sir,

    then i have try with below type of code, but i have to write it 1000 lines

    HTML Code: 

  6. #6
    Forum Contributor
    Join Date
    12-12-2017
    Location
    india
    MS-Off Ver
    2013
    Posts
    196

    Re: Vba required to remove Ordinal suffix from the numbers

    Thank you so much Fluff13 Sir

  7. #7
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Vba required to remove Ordinal suffix from the numbers

    Hi

    You only need to write it 10 times..
    ..since replace "1st", "1" will replace 21st with 21, 371st will become 371
    ..52nd will become 52, 972nd will become 972 etc etc etc

    so use..
    Please Login or Register  to view this content.
    zeddy

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Vba required to remove Ordinal suffix from the numbers

    Please try

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-12-2017
    Location
    india
    MS-Off Ver
    2013
    Posts
    196

    Re: Vba required to remove Ordinal suffix from the numbers

    Thank you so much Bo_Ry & zzzeddy

    Both of your code works Perfectly, Thank you so much for your Help!!!

    Awesome Forum Member

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. serial (ordinal) numbers after filtering
    By zookey in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-12-2016, 12:35 PM
  2. [SOLVED] Nested IF Formula Which Creates Ordinal Numbers From Numbers
    By zanshin777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2016, 10:35 PM
  3. ordinal numbers
    By dbuff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-03-2014, 09:36 PM
  4. Ordinal Dates and numbers (st,nd,rd,th)
    By squiggler47 in forum Tips and Tutorials
    Replies: 5
    Last Post: 05-24-2014, 02:23 PM
  5. Superscript ordinal numbers in CreateDate field
    By alexisn in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2014, 04:49 AM
  6. Ordinal dates and numbers in Excel 2007 or later
    By Tony Valko in forum Tips and Tutorials
    Replies: 2
    Last Post: 05-27-2013, 09:14 PM
  7. Ordinal Numbers in Dates
    By OfficeBitty in forum Excel General
    Replies: 13
    Last Post: 11-21-2006, 05:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1