+ Reply to Thread
Results 1 to 5 of 5

Adjust VBA code to work with more data

  1. #1
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Unhappy Adjust VBA code to work with more data

    Hi!!

    I have this code (from an Excel Forum user so you know its good!!!! ) that creates a unique list from a main table and brings that and another connected column into a new table. When it is bringing over one source of data (from the main table) it works fine, but when there is multiple sources of data (in the main table) it stops working. What I mean is pretty much the list of data is just longer... but won't work

    Here's the portion of code -- the line in RED is the line that I keep getting an error message one "1004: The extract range has a missing or invalid field name"

    Please Login or Register  to view this content.
    I know there isn't much context and I am so sorry for that, I'm hoping someone can read/understand this without looking at the file. I cannot share the data and creating a mock version would be a little difficult (but if absolutely needed of course I will try), but hopefully someone can just notice what's going on! Ahh!


    I can share the full code of what this comes from if needed but will have to change the names of some variables.

    Thanks in advance!

    Update: someone in my company was able to help me (I was having a hard time taking all the IP out of my file to post on here) but I will make a comment with the new code in case anyone was interested!
    Last edited by sy898661; 07-10-2019 at 05:21 PM.
    Thank you!!!

  2. #2
    Registered User
    Join Date
    04-21-2007
    Location
    Where your mind is
    MS-Off Ver
    OS 2010, 2013, 365.
    Posts
    42

    Re: Adjust VBA code to work with more data

    my guess is the ListObjects("MasterBOM2") has ony one column and you try to copy column 2

  3. #3
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Adjust VBA code to work with more data

    The table has 15+ columns, that's what I thought the issue was at first too like I had put the wrong number or whatever but it works when I do it with a shorter list! It's really weird

  4. #4
    Registered User
    Join Date
    04-21-2007
    Location
    Where your mind is
    MS-Off Ver
    OS 2010, 2013, 365.
    Posts
    42

    Re: Adjust VBA code to work with more data

    Can you load the file?

  5. #5
    Registered User
    Join Date
    07-24-2018
    Location
    California
    MS-Off Ver
    10
    Posts
    56

    Re: Adjust VBA code to work with more data

    Someone in my company--a truly amazing excel-guru--was able to help write me a new code that works better with my new data!!! I tried fixing my file to not show IP but it was damn near impossible without ruining the file for everyone else to understand.
    Attachment 631691

+ 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] Repeat cell value with said value and auto adjust data accordingly(need Amendment in code)
    By adeel1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-06-2017, 03:31 AM
  2. [SOLVED] vba code to adjust scattered data in their respective columns
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2017, 10:11 AM
  3. Replies: 1
    Last Post: 08-04-2016, 10:59 AM
  4. Adjust a macro to work with dynamic ranges
    By JPayne78 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2014, 03:07 PM
  5. Automatically adjust LINEST function to data set size with VBA code...
    By betapeg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2014, 05:54 PM
  6. [SOLVED] Userform code for .find function to adjust cell data
    By creekybones in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-20-2012, 04:55 AM
  7. [SOLVED] Adjust code to pull excel data in subject line
    By maxutility in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2012, 04:19 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