Edit VBA code for saving data with merged cell

  • Dear All,


    Could anyone help me to edit the VBA code so that I can save data correctly into another sheet.
    Please see attached file and the code below that I don't know how to edit so it can be worked with merge cell.


    Many thanks for your help and time



    Regards,


    Heng

  • Re: Help to edit VBA code for saving data with merge cell


    You are using the Excel Evil of merged cells - they will cause you nothing but heartache and reduce simple ability to copy and paste data as you have discovered. You have 2 choices - redesign your workbook e.g. for Date Of Payment, Company Name use Textboxes then just use a single cell for Description and widen the cell. If you can avoid merged cells then always do so. They cause nothing but grief.
    If you choose not to redesign then you will need to copy values from CPV to GL essentially cell by cell using the first cell of the merged cells as the copy from location.
    Good design of a worksheet from the beginning will save you a whole lot of problems in the future.

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: Help to edit VBA code for saving data with merge cell


    Dear Smuzoen,


    Really thanks for your advice. I understand your point but because my management want it to be this way. Thus, It is hard for me favor their liking.
    Have a good day!


    Regards,


    Heng

  • Re: Edit VBA code for saving data with merged cell


    I am not sure exactly about which duplicate values you want to remove - you had selected all of them however I changed it to what I think you were trying to do. You may have to adjust to your needs.
    Try

    Files

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: Edit VBA code for saving data with merged cell


    Dear Smuzoen,
    Thanks for your great work!
    Really thanks for your advice.
    Wish you all the best.


    Best regards,


    Heng

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!