+ Reply to Thread
Results 1 to 3 of 3

Beginner. Creating Macro to organise data from extract into table row

  1. #1
    Registered User
    Join Date
    05-10-2021
    Location
    Derbyshire
    MS-Off Ver
    2016
    Posts
    5

    Beginner. Creating Macro to organise data from extract into table row

    Every day, we extract data for metres printed through our machines. Every job that runs has its own file with all of the machine data presented in a list (Field name then data) in column A. I want a macro that allows me to open the workbook for any job and it copies the relevant data into a row. However, the problem is it always references the file that I record the Macro in (Even when I select Record to Personal) And i get Runtime Error 9 when I run in a new workbook.
    Macro is below and I will highlight the first row it highlight for debug.

    Please Login or Register  to view this content.
    So obviously the issue is "csm cadbury 7fj bites,430" only exists for the original sheet and is a new job name for each one. any help appreciated if you want anymore info please let me know.

    Snippet.PNG
    Last edited by AliGW; 11-04-2021 at 05:46 AM. Reason: Code tags added.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,980

    Re: Beginner. Creating Macro to organise data from extract into table row

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. 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, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then 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

    (Note: this change is not optional. As you are still new here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-10-2021
    Location
    Derbyshire
    MS-Off Ver
    2016
    Posts
    5

    Re: Beginner. Creating Macro to organise data from extract into table row

    Okay, Thank you for the change I will make sure to keep this in mind in future

+ 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. How to best organise data in Pivot table
    By X82 in forum Excel General
    Replies: 4
    Last Post: 10-20-2016, 02:20 AM
  2. Need Help in Creating Macro to extract data from website.
    By houstonking in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2014, 08:04 PM
  3. organise data with pivot table
    By zbelden in forum Excel General
    Replies: 1
    Last Post: 08-16-2010, 02:35 PM
  4. Creating a Macro Button to Extract Data
    By william4444 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-03-2006, 11:38 PM
  5. Creating a Macro Button to Extract Data
    By william4444 in forum Excel General
    Replies: 1
    Last Post: 07-03-2006, 09:04 AM
  6. Help with file open and data organise macro
    By frankcase in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2005, 03:05 AM
  7. need help to create excel macro to organise data
    By frankcase in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2005, 05:41 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