+ Reply to Thread
Results 1 to 15 of 15

I would like to create a macro that captures data when a specific word is used.

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    I would like to create a macro that captures data when a specific word is used.

    I am trying to Create a Macro that will find a specific word in a column (on active TCP BOARD spreadsheet) and copy that word and associated cells (about 10 additional cells in the same row - both to the left and to the right of the the "trigger" word) to a seperate sheet- BILLED. The sheet (ACTIVE TCP BOARD) that the data is originally input to will be changed, and the data input will be removed eventually. The sperate sheet BILLED needs to be an ongoing list, that compiles and keeps the data that was mined. This list will only get larger as time passes.

    I PLAN SCHEDULE TEST.xls

    I have attached my workbook, Currently I have three spreadsheets ACTIVE TCP BOARD (ATB), BILLED, SHEET 3. ATB is the place where my data is input, changes are made and ultimately the inputs are discarded. Billed is where I would like my historical list to to be compiled and kept (this will be a protected sheet) The list will take the inputs as the status changes the status will always change in this sequence, NOTES, OFA, APPROVED, BILLED. Once the data is moved to this sheet the data will be removed from ATB.

    Specifically, ATB column I, once the status becomes billed i need the infomration from the same row (COlumns C-L) to be copied to billed spreadsheet. This spread sheet needs to be able to keep the data (This will become a historical list). SHEET 3 is a shet that contains a bunch of conditional formatting that is necessary but can be transferred to ATB, since the information is redundant.

    I am not sure if what i would like to do is even possible. But i do greatly appreciate and and all information/help.
    Last edited by CNHAUS; 03-04-2013 at 08:41 PM.

  2. #2
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    Try this sheet and see if it does what you want. Note that I got rid of the numbers going down the sides, they will be added in as each line gets added.
    PLAN SCHEDULE TEST.xlsm

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    AWESOME! It looks like it is going to do the trick. Thanks for your help. I will verify tomorrow when I am at work. Thanks again.

  4. #4
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    PLAN SCHEDULE TEST.xls
    Ive tried to run this this morning, but cant seem to get it to run.. I'm sure I'm making a novice mistake but dont know what I'm doing wrong.

    Can you please walk me through this process. Did you by chance write the macro with a specific cell as the starting point?

  5. #5
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    That sheet doesn't have any of the code in it. You'll need to place this code in the module for your sheet ACTIVE TCP BOARD:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    PLAN SCHEDULE TESTdraft.xlsm
    The macro doesnt seem to be running. I have added more examples to the bottom of the list on sheet ATB. I need to be able to pull all the "Billed" status for rows 1-36. That list should then move to the billed sheet.

  7. #7
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    FYI - In my previous post I took the Workbook you sent back to me with the code in it. (Since it became apparent I deleted the code you setup at somepoint.

  8. #8
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    It works fine for me. Can you take me step by step through what you are doing?

  9. #9
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    I open the workbook, click to the Active TCP board sheet (i have tried highlighting a cell containing "Bill", highlighting an empty cell, random cells), and press ctrl+q. After a minute I click on the 'Billed' sheet and it isn't different. THe examples in rows 31-39 don't show up on the 'Billed' sheet.

    I've tried using the shortcut, ctrl+q. I've also tried clicking the developer tab, macros, (highlight "BilledList") click run.
    I've also tried clicking visual basic: clicking f5 and also, clicking the run sub/userform (green play button)

    How long is a reasonable time for the macro to run?

  10. #10
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    It's set up to run when you enter "BILLED" on that sheet. I'll put together one to run when you choose to take care of everything that has already been entered as "BILLED".

  11. #11
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    OH!! That makes sense.

  12. #12
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    Okay, I just used the function you had declared but never used. This one will run when you want, and will look at all rows, copying only those rows that have not been copied previously. You should only need to run that one time, then after that everything will copy when you enter "BILLED".
    PLAN SCHEDULE TEST.xlsm

  13. #13
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    Capturedebugger.JPG
    I am getting an error when trying to run the macro (pressing ctrl+q)
    here is a screenshot

  14. #14
    Registered User
    Join Date
    03-04-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: I would like to create a macro that captures data when a specific word is used.

    I really appreciate your help!!
    I am beginning to think that macros are beyond me!

  15. #15
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: I would like to create a macro that captures data when a specific word is used.

    My bad. I didn't test it on a cleared history. Here's the fixed version:
    PLAN SCHEDULE TEST.xlsm

    You'll get them eventually. It took me a little bit then something clicked and everything made sense.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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