Results 1 to 4 of 4

Thread: Deleting

  1. #1
    Neophyte Kelvin Maed's Avatar
    Join Date
    Oct 2012
    Location
    Bristol, United Kingdom, United Kingdom
    Posts
    2
    Articles
    0

    Deleting



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    The below code is an export from my stock program.

    The code is 3 columns across and hundreds of rows down

    what i want;

    to remove the row that contains for example;

    cell A10 contains "000000000000000007: DASH COKE / DIET" so to remove this row completely
    cell A14 contains "000000000000000012: KICK" remove this row completely
    cell A18 contains "000000000000000029: GOL VODKA & KICK" keep this row.

    the cell changes with what the people have sold, but the text always stays the same, so i am looking to delete rows when they contain certain texts.

    thanks
    Code:
    PLU Journal Report Showing Journal PLUs, Grouped By Clerks (Numbered)
    Date: 08/09/2012
    Place: All Sites
    Description PLUs
    Clerk (Numbered) 1: STEVE MARTIN (ECR Network 101:)
    000000000000000004: BABY TONIC 1
    000000000000000007: DASH COKE / DIET 25
    000000000000000008: DASH LEMONADE 28
    000000000000000009: DASH LIME 5
    000000000000000012: KICK 3
    000000000000000028: SGL VODKA & KICK 6
    000000000000000029: GOL VODKA & KICK 34
    000000000000000033: JUNGBOMB 40
    000000000000000044: GOL ODESSA VODKA 12
    000000000000000045: GOL JACK DANIELS 0
    000000000000000047: GOL SOUTHERN COM 2
    000000000000000052: GOL AMARETTO 2
    000000000000000053: GOL ARCHERS 3
    000000000000000058: CORKYS APPLE 4
    000000000000000062: GOL GORDONS GIN 1
    000000000000000065: SAMBUCA 4
    000000000000000066: CORKYS FLAVOURS 2
    000000000000000073: TEQUILA 20
    000000000000000088: K2 FLAVOURS 3
    000000000000000089: VK FLAVOURS 9
    000000000000000090: VK BLUE 2
    000000000000000093: BULMERS 330ml 3
    000000000000000099: STELLA 12
    000000000000000100: COORS LITE 1
    000000000000000101: BECKS 4
    000000000000000102: CARLING 500ml 1
    000000000000000103: BUDWEISER 4
    000000000000000105: CARLING PINT 3
    000000000000000106: COORS LITE PINT 3
    000000000000000107: OLDE ENGLISH PIN 3
    000000000000000124: CHATEAU CHARMAIN 2
    000000000000000160: SGL ODESSA VODKA 21
    000000000000000161: SGL JACK DANIELS 8
    000000000000000162: SGL MALIBU 1
    000000000000000163: SGL SOUTHERN COM 1
    000000000000000164: SGL AMARETTO 3
    000000000000000165: SGL ARCHERS 1
    000000000000000169: SGL CAPTAIN MORG 1
    1: MIKE GRINTER (ECR Network 101:) 278
    Clerk (Numbered) 2: CHEVY CHASE (ECR Network 101:)
    000000000000000003: PEPSI / DIET BOT 1
    000000000000000005: DASH ORANGE 3
    000000000000000006: DASH CRANBERRY 4
    Code:
    
    

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,268
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Have you tried using the Autofilter to filter out the records you want to delete? Or are you trying to automate the process?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    I would add a simple helper column with a formula that checks for that code, such as

    =OR(A2={"000000000000000007: DASH COKE / DIET","000000000000000012: KICK","000000000000000029: GOL VODKA & KICK"})

    and filter for TRUE on that column. That would facilitate easy automaton.

  4. #4
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,268
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    As long as it's a short list, for sure.I'm assumign it's a list of non-stocked products that he's trying to remove, so maybe leveraging a VLOOKUP against a table of those products would be even better?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

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