+ Reply to Thread
Results 1 to 12 of 12

Remove only the previous 0

  1. #1
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Remove only the previous 0

    Snap85.jpg

    I've used the array formula

    --> {=RIGHT(A1,LEN(A1)-MIN(IF(MID(A1,ROW($A$1:$A$100),1)<>"0",ROW($A$1:$A$100)))+1)}

    However, it is too complicated.

    I would like to solve with regular expressions.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Remove only the previous 0

    It works on the attached. If the pattern changes it might not.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-28-2014
    Location
    Minnesota
    MS-Off Ver
    13
    Posts
    12

    Re: Remove only the previous 0

    Hi Chief,
    Give this a try - a little trickery, but it works.
    001A 01A
    002B 02B
    010A 10A
    100C 100C
    =IF(LEFT(C7,1)="0",RIGHT(C7,LEN(C7)-1),C7)
    Hope this helps,
    Snuggles
    Last edited by Snuggles; 11-21-2015 at 01:10 PM.

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

    Re: Remove only the previous 0

    If Regular expression, should be
    Please Login or Register  to view this content.
    Last edited by jindon; 11-21-2015 at 02:15 PM.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Remove only the previous 0

    How about a little less horsepower?

    Row\Col
    A
    B
    C
    2
    001a 1a B2: =LZTrim(A2)
    3
    002b 2b
    4
    010a 10a
    5
    100c 100c


    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    03-31-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Remove only the previous 0

    How about =IF(LEFT(A1,2)="00",RIGHT(A1,LEN(A1)-2),IF(LEFT(A1,1)="0",RIGHT(A1,LEN(A1)-1),A1))

  7. #7
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: Remove only the previous 0

    Hi! AB33

    Thank you so much! Have a nice day.

  8. #8
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: Remove only the previous 0

    Thank you very much! jindon

  9. #9
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: Remove only the previous 0

    Hi shg

    Thank you so much!

  10. #10
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: Remove only the previous 0

    Hi! Jimbo77

    Why use an array formula ... 0 --> can increase

    I appreciate your interest.

  11. #11
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: Remove only the previous 0

    Hi! Snuggles

    I wrote in another article...Why use an array formula ... 0 --> can increase

    I appreciate your interest.

  12. #12
    Registered User
    Join Date
    10-28-2014
    Location
    Minnesota
    MS-Off Ver
    13
    Posts
    12

    Re: Remove only the previous 0

    Thanks for responding to me, Chief.
    I learned something for sure with this thread.
    First, I had never heard the term "regular expression."
    There are definitely many ways to do the same thing !
    Regards,
    Snuggles

+ 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. Create Userform to Edit, View, Remove and Find next/ previous data
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-17-2015, 11:00 PM
  2. [SOLVED] Find certain word, copy and paste cell in previous row if previous row is blank
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 12:53 PM
  3. [SOLVED] Find last previous non blank value and summarise previous 6 months
    By Lady_Shaz in forum Excel General
    Replies: 7
    Last Post: 12-11-2012, 06:20 AM
  4. Replies: 2
    Last Post: 11-15-2012, 10:52 AM
  5. Replies: 0
    Last Post: 10-14-2011, 12:09 PM
  6. Copy formulaes to next column and make the previous data static(remove the formulaes)
    By deeps1403 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2011, 03:16 AM
  7. Remove previous file reference
    By mkerstei in forum Excel General
    Replies: 3
    Last Post: 06-07-2006, 11:13 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