+ Reply to Thread
Results 1 to 7 of 7

Runtime error when combining data using macro

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    somewhere
    MS-Off Ver
    Office 2007
    Posts
    6

    Runtime error when combining data using macro

    I found this script on here and can't find the thread so I could ask this question.

    Attached is the ws i'm trying to combine data in

    I get an runtime error on "Myval = Range("A1:A" & ws1.Range("A2297").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Count" but am unable to figure out my problem

    This is NOT my script nor do I take credit for any parts. Just simply trying to get some stuff sorted for work.


    thanks...
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Runtime error when combining data using macro

    Can you tell me what it is exactly you are trying to do. Maybe I can come up with a better solution for you.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    11-28-2012
    Location
    somewhere
    MS-Off Ver
    Office 2007
    Posts
    6

    Re: Runtime error when combining data using macro

    column A is a PM procedure number, column B is the parts that go along with the corresponding PM

    if you look at column A you will see there is multiple entries due to the format the database used for export

    i have to enter the PM numbers and Part numbers into a new database and need to consolidate this list to only have the PM number listed once and the Part numbers all listed into the cell to the right

    thanks for your response

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Runtime error when combining data using macro

    So are Part numbers all listed into the one cell to the right or one Part number per cell. If all in one cell should the be separated by a comma or space or something.

  5. #5
    Registered User
    Join Date
    11-28-2012
    Location
    somewhere
    MS-Off Ver
    Office 2007
    Posts
    6

    Re: Runtime error when combining data using macro

    the format of the script is to sort them into one cell which will be seperated by a space... right now its on part number per cell in column b which makes column a have duplicate entries

    example:

    1 111708
    1 111709
    1 111704
    2 111650
    3 111543
    3 111532

    i need

    1 111708 111709 111704
    2 111650
    3 111543 111532

    thanks again


    probably should clearify that i need this in 2 columns... column a is PM# columb B is Part#

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Runtime error when combining data using macro

    Give this a try

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-28-2012
    Location
    somewhere
    MS-Off Ver
    Office 2007
    Posts
    6

    Re: Runtime error when combining data using macro

    man i appreciate that so much... worked awesome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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