+ Reply to Thread
Results 1 to 9 of 9

Replace numbers with zero

  1. #1
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Replace numbers with zero

    Hello All
    I have a column of numbers in col AG.
    Is there a macro or formula which will replace all numbers above 9 with zero.Some cells in col G,are blank
    Data is around 50000 rows.
    Many Thanks for help given.

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Replace numbers with zero

    Try,
    Please Login or Register  to view this content.
    Last edited by berlan; 07-02-2015 at 02:39 PM.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Replace numbers with zero

    Hello bigband1,

    Are all the number in column "AG" ? I ask because you also mention "Some cells in col G,are blank".

    Are you referring to whole numbers or the digits in the number when you test for a 9?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Replace numbers with zero

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Replace numbers with zero

    Perhaps, as a very much amateur at this stuff, I'm missing something, but the rather juvenile and easy (for me) to follow, looping code below seems to solve the OP problem in about 1 second for 1 million rows, and in very negligible time for only 50,000.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Re: Replace numbers with zero

    Thanks for the reply Leith
    My error,"Some cells in G",should read AG
    Regards

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Replace numbers with zero

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Replace numbers with zero

    Jindon, nice and concise to use evaluate, but sometimes this particular code seems unreliable when it works and when it doesn't work.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Replace numbers with zero

    Quote Originally Posted by berlan View Post
    Jindon, nice and concise to use evaluate, but sometimes this particular code seems unreliable when it works and when it doesn't work.
    What do you mean?

+ 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. Convert negative numbers to positive numbers using Excel "Find and Replace" Function
    By FoodieJoan In LA in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2015, 09:40 PM
  2. [SOLVED] Replace a * with Numbers
    By pugsly8422 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2012, 11:12 AM
  3. Replace numbers with new numbers in same place
    By Madirish in forum Excel General
    Replies: 4
    Last Post: 02-21-2011, 04:41 AM
  4. [SOLVED] delete numbers and replace with numbers from adjacent column
    By troysie in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2010, 05:31 AM
  5. [SOLVED] replace numbers with X
    By davids in forum Excel General
    Replies: 5
    Last Post: 03-15-2006, 09:50 PM

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