+ Reply to Thread
Results 1 to 6 of 6

merge cells using vba

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    merge cells using vba

    Hi excel guru,

    I want to merge cells using vba.The below code working fine for product more than one but when there is only one product then below macro is not working.

    Please find the attached sample file.

    Please help me to solve this issue.

    Regards

    Upa


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: merge cells using vba

    Attached sample file doesn't have complete information.
    Please attach a sample file with multiple products in one sheet and its expected output in it. Also, another sheet with one product and expected result in it.

  3. #3
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    Re: merge cells using vba

    Hi abduljaleel.mca,

    Thanks for the reply!

    Please find the attached

    Sheet1 having one product and sheet2 having multiple products.

    Actually if in sheet1 having one product then i do not want to merge total price. if in sheet1 having multiple product then total price should merge.

    regards
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: merge cells using vba

    Made small changes in your code. Try this.
    Please Login or Register  to view this content.
    Last edited by abduljaleel.mca; 08-04-2016 at 04:34 AM. Reason: Removed unnecessary codes

  5. #5
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    Re: merge cells using vba

    abduljaleel.mca, that is exactly what I am looking for. Works a treat. Thank you!

    regards,

    Upa

  6. #6
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: merge cells using vba

    I'm glad that I was able to help you.

+ 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] Macro merge cells separated by comma, ignore blank cells
    By lagiosman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2014, 04:49 PM
  2. Replies: 2
    Last Post: 01-22-2014, 02:35 PM
  3. Merge data from cells on 2nd columns in which the cells of 1st column repeat
    By jagke in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2013, 01:06 PM
  4. Replies: 0
    Last Post: 11-03-2012, 06:11 PM
  5. Replies: 0
    Last Post: 06-27-2012, 06:29 AM
  6. How to merge date from adjacent cells inbetween current cells
    By hdawson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2009, 08:03 PM
  7. Replies: 2
    Last Post: 07-20-2006, 09:05 AM
  8. [SOLVED] MERGE CELLSHow to merge two cells in excel?
    By laure abbass in forum Excel General
    Replies: 1
    Last Post: 11-10-2005, 01:50 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