+ Reply to Thread
Results 1 to 5 of 5

Excel VBA Macro - Find Word and Select that Column to Column D and copy

  1. #1
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Post Excel VBA Macro - Find Word and Select that Column to Column D and copy

    Hello,

    I've looked around the forums and on Google and either I can't find the answer, or I don't understand what I found as the answer. I have several different macros that will find data throughout my workbook, compile this data into a single column, copy the column into Column C of a worksheet, and insert a new column C (moving the data over to a new column with each new column entered. The order of the columns is important but the data within the columns isn't, as long as it remains in the columns.

    Problem: I create so many different columns with new data that the computer begins to work slowly when adding new columns so I need to copy these created columns (Column D through the current last column) only and put them in a whole new excel workbook.

    Method: I have created an empty column with the word "End" in row 1 (colored red) that moves anywhere between Columns D until the last column where my computer starts to run slow (I estimate this to be around column ZZ but it could be further than that). I have also recorded and edited a macro that will search for the word "End" and select that column.

    Please Login or Register  to view this content.
    I need this code to continue to select (activate) all columns beginning at this End Column and returning to Column D and copy it. If it helps anything, my last row of any data is 101. Also, I'm just learning Excel VBA. I have no prior experience and am teaching myself through literature found on Google and You Tube videos. If you see anything with my coding as is (why are you selecting cells, etc.) please go easy. It's a combination of the recording and copied macro elements I've found around the internet, and I haven't learned how everything works enough in order to clean it up. I'm still trying to figure out how to work with VBA and I appreciate the work that everybody here has put into helping people like me learn.

    BTW, do you have any recommendations of a site (or book) that has a list of the commands that VBA can do?

    Thanks in advance,
    - MsBBS
    Last edited by MsBBStacker; 11-02-2015 at 12:05 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel VBA Macro - Find Word and Select that Column to Column D and copy

    Hi,

    I find it difficult to visualise this so it would be useful if you could upload the workbook.
    It would also be useful if you could state the task you are wanting to achieve after processing the data andm manually add the set of results you expect after processing. Don't tell us how you are currently trying to do this, just tell us the start situation and show the end position. It may be that your task can be achieved in a more efficient manner.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Re: Excel VBA Macro - Find Word and Select that Column to Column D and copy

    I remember posting this question earlier but it's not showing up in my own posts. After posting this, I found that this isn't posting in my own posts either. I apologize if I created a double thread and will provide the link to the other one if I happen to find it

  4. #4
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Re: Excel VBA Macro - Find Word and Select that Column to Column D and copy

    Here's a Sample file of what I'm working with. The end product will be a cipher for personal communication uses.

    "Srch" Tab: Begin here. This is where I need the macro I'm asking for to work.
    Find All Button: Search only Letters, _, ?, !, ., and I think coma.
    Tabs A,B,C: Key Tabs, no editing or changing Necessary
    "Rand" Tab: Randomizes the Search Results Tab (Changes every time new search is made)
    The Sample Tabs: (SampTab1, 2, & 3) all simulate a different file. They further describe what I'm doing.

    Thanks for the help.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-22-2015
    Location
    Oneonta, ny
    MS-Off Ver
    2010
    Posts
    30

    Re: Excel VBA Macro - Find Word and Select that Column to Column D and copy

    Solved.....I named the range beginning with the B Column (left alone) and ending with the End Column. I set the macro like this:

    Please Login or Register  to view this content.
    Thanks for the help.

+ 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: 3
    Last Post: 11-25-2014, 06:08 AM
  2. [SOLVED] Macro to find the empty cell in a column and copy a adjacent row to another column.
    By naga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2013, 07:44 AM
  3. [SOLVED] Using a macro to select rows with a specific word in a column
    By ahilty in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-15-2013, 04:20 PM
  4. [SOLVED] Excel VBA macro to select range separated by blank row and copy to next empty column
    By hackini in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2013, 02:13 AM
  5. VBA to enter a word, find said word in string of column & copy to another column
    By tuneloon in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-29-2012, 11:59 AM
  6. Replies: 1
    Last Post: 05-06-2011, 03:08 AM
  7. Find word in column and copy cell to the right
    By dariushou in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2008, 05:40 PM

Tags for this Thread

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