+ Reply to Thread
Results 1 to 9 of 9

Macro to remove certain lines based on barcode format

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Macro to remove certain lines based on barcode format

    Hello everyone,

    I have a long spreadsheet of items with various barcodes.
    What i need to do is remove every line with a barcode that includes one or more letters, so the table will only include numeric codes.
    I searched through loads of code examples on how to delete lines, but i'm not really good with VBA and wasn't able to get anything working.
    Been thinking maybe to use IF but i got hit by errors and crashes.

    I already use a piece of code to make sure shorter barcodes get some 0es in front of them to up them to the 13 digit standard, and copy in a different cell.
    Please Login or Register  to view this content.
    Any help would be much appreciated.

    Cheers,
    Alex
    Last edited by ciuncky; 09-10-2014 at 07:38 AM.

  2. #2
    Registered User
    Join Date
    04-24-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Macro to remove certain lines based on barcode format

    Try this. This is to check strings from column D and clears cell value is value is not numeric. Should it clear the whole row?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-24-2013
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Macro to remove certain lines based on barcode format

    Try this. This is to check strings from column D and clears cell value is value is not numeric. Should it clear the whole row?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to remove certain lines based on barcode format

    It should indeed delete the entire row, and start from the bottom

  5. #5
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to remove certain lines based on barcode format

    Any updates here , guys ?
    Would really appreciate it

    Cheers,
    Alex

  6. #6
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Macro to remove certain lines based on barcode format

    Please Login or Register  to view this content.
    HTH
    +++ If I helped please add reputation +++

  7. #7
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to remove certain lines based on barcode format

    Amazing guys ! Thanks a lot , works wonders.
    I need to set the Application.ScreenUpdating = False back up, kills my eyes now

    Rep added to both
    Cheers !

  8. #8
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Macro to remove certain lines based on barcode format

    Quote Originally Posted by ciuncky View Post
    Amazing guys ! Thanks a lot , works wonders.
    I need to set the Application.ScreenUpdating = False back up, kills my eyes now

    Rep added to both
    Cheers !
    Thanks for the rep Please mark the thread as solved if you're done!

  9. #9
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to remove certain lines based on barcode format

    Done !

    Thanks again mate

+ 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. Format SS with grid lines using VBA loop/macro
    By brennaboy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2012, 01:14 PM
  2. Replies: 1
    Last Post: 01-29-2012, 10:51 AM
  3. Need help creating macro to add & remove lines on multiple sheets
    By gheffron in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2011, 08:09 PM
  4. Macro to force format and check barcode check digit
    By Code Flunkie in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-02-2009, 10:27 AM
  5. Replies: 0
    Last Post: 10-13-2008, 09:10 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