+ Reply to Thread
Results 1 to 11 of 11

Macro to delete certain items then count remaining items

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Macro to delete certain items then count remaining items

    Dear All,

    please have a look at the attached file

    In column A, I have 30,000+ entries.

    I am trying to come up with a macro that does the following:

    1. Delete all items with real names ( like Balance, Street Art etc) so only items with the 3-letter code remain.
    2. All 3-letter codes have a suffix like -1P or -3P or -Pano and so on. The suffix needs to be deleted as well
    3. So only the 3 Letter codes remain in Column A.
    4. Count each 3 Letter codes - eg. How many of "CKJ" are in Column A? Or how many of "DMN"? And so on...

    I hope the attached file shows the mission...

    Thanks muchly!
    Attached Files Attached Files
    Last edited by elgato74; 12-14-2019 at 02:03 PM.

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

    Re: Macro to delete certain items then count remaining items

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    Hi,

    gives me a compile error Attachment 653928

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

    Re: Macro to delete certain items then count remaining items

    Your attachment is invalid.
    What was the error message?

  5. #5
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    Sub or function not defined

  6. #6
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    Attachment 653930 Sub or function not defined

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

    Re: Macro to delete certain items then count remaining items

    Which part was highlighted in blue?

  8. #8
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    the empty line

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    deleted the empty line, works like a charm now. Thanks a bunch. Cheers

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

    Re: Macro to delete certain items then count remaining items

    Glad you sorted it & thanks for the feedback

  11. #11
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    568

    Re: Macro to delete certain items then count remaining items

    Quote Originally Posted by Fluff13 View Post
    Glad you sorted it & thanks for the feedback
    You are welcome, feel free to give me feedback for sorting it

+ 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. Replies: 7
    Last Post: 12-11-2018, 09:44 AM
  2. [SOLVED] Calculate remaining items
    By Rymar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2015, 07:18 AM
  3. Vlookup with remaining items populated below
    By excelnoob927 in forum Excel General
    Replies: 11
    Last Post: 01-02-2015, 09:10 PM
  4. [SOLVED] Vlookup with remaining items populated below
    By excelnoob927 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2014, 11:07 PM
  5. [SOLVED] Need to count items in column that match multiple data items
    By bclucas55 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-27-2014, 10:03 AM
  6. Count of Items that are Greater than the Average of those Items
    By bbg22 in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-19-2014, 07:07 AM
  7. Replies: 3
    Last Post: 01-21-2010, 06:58 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