+ Reply to Thread
Results 1 to 7 of 7

vb script to find specific names in columns and delete the other columns

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Exclamation vb script to find specific names in columns and delete the other columns

    I want to keep "item id" and "total count"

    and delete the rest of the columns


    please see the example file





    SalesOrderEntryBothDetail315-11_10_2015(1).xls

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

    Re: vb script to find specific names in columns and delete the other columns

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: vb script to find specific names in columns and delete the other columns

    How can I use it as a module

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

    Re: vb script to find specific names in columns and delete the other columns

    See.....................

  5. #5
    Registered User
    Join Date
    12-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: vb script to find specific names in columns and delete the other columns

    I would like to add the sub to the a script that runs other macros after this.

    Sub EveryThing()


    Call delcol // This is the script I want to call which you made

    Call Blankcleanup

    Call revsign

    Call DeleteByFindDoLoop1

    Call DeleteByFindDoLoop2

    Call DeleteByFindDoLoop3

    Call DeleteByFindDoLoop4

    Call DeleteByFindDoLoop5

    Call DeleteByFindDoLoop6

    Call DeleteByFindDoLoop7

    Call DeleteByFindDoLoop8

    Call DeleteByFindDoLoop9

    Call DeleteByFindDoLoop10

    Call DeleteByFindDoLoop11

    Call test


    ' will run all modules in above order Don't change them.


    End Sub

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

    Re: vb script to find specific names in columns and delete the other columns

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Add one line just before end sub.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: vb script to find specific names in columns and delete the other columns

    I got it to work thank you so much

+ 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. [SOLVED] Delete columns - Prioritise columns with specific headers
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2015, 07:18 AM
  2. Using a script to compare and delete columns
    By uomoeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2014, 02:28 PM
  3. [SOLVED] .Find Help - Search only in specific columns (or ignore other columns)?
    By NewYears1978 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2014, 11:32 AM
  4. [SOLVED] Help with macro or script to delete specific columns from worksheet
    By damjerm in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-23-2013, 01:40 PM
  5. Delete 1 to 8 rows. Do text to columns to specific columns.
    By niceblue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2013, 10:53 AM
  6. [SOLVED] Script to delete certain columns in a worksheet
    By dip11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2012, 11:02 AM
  7. Delete Specified columns and/or rows script
    By Immortal_Creati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2008, 04:24 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