Excel VBA Merge Cells for a Table run time error"1004"

Anonymous
2020-02-09T15:51:00+00:00

Table AccessDownload (A1:H172)  Merge cells where dates are the same and if description is closing Balance

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

65 additional answers

Sort by: Oldest
  1. Anonymous
    2020-02-09T17:06:40+00:00

    Hi

    Please add to the code

    Dim MyRng, rng As Range

    Set MyRng=ActiveSheet.Selection

    For Each rng in MyRng

    The rest of your code...

    Do let me know if you need more help 

    Regards 

    Jeovany

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-02-09T17:37:07+00:00

    Hello Jean

    I am V. Arya, Independent Advisor, to work with you on this issue. On a small data set of 4 cells, I tested your code and it works fine. On which statement does it give error?

    Was this answer helpful?

    0 comments No comments
  3. Lz365 38,201 Reputation points Volunteer Moderator
    2020-02-09T18:01:13+00:00

    Hi JF_2010 / Jeovany / V.Arya

    The problem might be in the title of the thread (Excel VBA Merge Cells for a Table) and would consequently have nothing to do with VBA. However, given the number of people who say they use Tables while they use Ranges, not sure...

    If data from Access where imported into Excel via:

    • Data > Get Data > From Database > From Access

    OR

    • Data > Get Data > Legacy Wizards > From Access

    In both cases they're in an Excel Table

    @JF_2010

    Could you put clarity into this please - I mean Table, or not Table?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2020-02-09T18:32:19+00:00

    Jeovany here is the output

    Was this answer helpful?

    0 comments No comments