+ Reply to Thread
Results 1 to 3 of 3

Error with Merging cells Macro

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Error with Merging cells Macro

    I have a macro which merges all the numbers of a column into a single cell and separates each value with a semi colon.
    The only problem that I am having is that I get a mismatch error if there is just one number in the row.
    I want the merged cell (K11) to contain what ever is in the row (J) even if it is just one number. I have attached a spreadsheet as an example.
    Can anyone help me with this please?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,704

    Re: Error with Merging cells Macro

    In your code you have this.
    Please Login or Register  to view this content.
    Are you aware of what this does?
    Run the below macro to see.
    Please Login or Register  to view this content.
    In your attachment, the only numbers I see are in cell J11 on Sheets 4 and 5.
    Don't see any other numbers.

    Maybe attach a workbook with a before and after.

  3. #3
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Error with Merging cells Macro

    Thank you for your reply. Yes I am aware of what the macro does. I set it up so that it works on all sheets but "Buttons, subjects and Comps". The macro works fine if I have more than one value in the J column but if I only have one value in the column then I get an error.
    I left the example with just one value so that you can see the error when the macro is run. If you put any number in for example cell J12 it will work without any issue.
    I hope that makes more sense.

+ 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