+ Reply to Thread
Results 1 to 11 of 11

Macro to merge cells based on cell references

  1. #1
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Macro to merge cells based on cell references

    Book1.xlsx

    Can anyone help me create macro that makes turns the before tab into the after tab?

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to merge cells based on cell references

    hi ajm123456789, please check attachment, option to make it, press Run
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Macro to merge cells based on cell references

    You sir are a god among men.
    Any way to add conditional formating to the macro? Make each cell a different color?

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to merge cells based on cell references

    can you give an example?

  5. #5
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Macro to merge cells based on cell references

    Book1.xlsx

    Also the names in the cells?

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to merge cells based on cell references

    do you mean sort of this?
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Macro to merge cells based on cell references

    Wow. I'll probably have questions later. But for now, just wow.

  8. #8
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Macro to merge cells based on cell references

    I extended the number of rows of data to 14 from 10. An error is occuring in the code. Can you help?

    Please Login or Register  to view this content.


    ---------- Post added at 03:34 PM ---------- Previous post was at 03:33 PM ----------

    the error is in this line
    vl = CLng(idata(i, n + 1))
    Last edited by Cutter; 08-30-2012 at 08:25 PM. Reason: Added code tags

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro to merge cells based on cell references

    @ ajm123456789

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  10. #10
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro to merge cells based on cell references

    i need file in .xls format to answer your question. If the data layout has not changed it should work

  11. #11
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Macro to merge cells based on cell references

    Yeah your right, there was additional information at the bottom that messed it up

+ 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