+ Reply to Thread
Results 1 to 17 of 17

how to substract merging cells

  1. #1
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    how to substract merging cells

    Dear Everyone,

    I have below general query, i have some merged numerice values in ColumnK & ColumnO and i want to substract columnO - ColumnK = ColumnP merged output should be comes in columnP, kindly suggest me vba code.

    Please find attached for better understanding the query.

    and thankyou for lookin

    and also pls find below link of cross-posting, as my sir is not working with merged cells, hence if anyone working with merged cell pls help me out for finding results.
    https://www.mrexcel.com/board/thread...3#post-5608010

    Thankyou
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,720

    Re: how to substract merging cells

    See here: https://excel.solutions/2016/10/usin...ctively-excel/
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    Dear AliGW,

    i am not merging it. The data which we are receiving on daily basis that data columns comes in merged cells hence we have to making report also based on that merged cells and obvious output also displayed as merged cells. For not doing that daily repetitive activity i am concerning to VBA.

    Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: how to substract merging cells

    Hi, Aziz
    Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    akuini we are just close, it's substracting perfect but as my ColoumnP is not merged we need to set one more code that out put also should comes with along with merge cells. i know that in my sample file i had already merged columnP but that was just for understanding purpose as output result, we just need to one more code for output as merge. however substracting columns get substracting fine.

    thanks,
    Last edited by Aziz Shaikh; 12-21-2020 at 11:19 AM.

  6. #6
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    Here is hint, after substracting first values we are getting "0" until 2nd value in unmerged columnP , if we do remove the duplicates of only "0" then we will get blank cells after every substracted first value then i think we could do merge easily with using "" blank function. it was just suggestion for our last code to making easier.

    thankyou pls correct me if i am thinking wrong.

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: how to substract merging cells

    Please try

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    Thankyou but we need one more extra code that output of ColoumnP is not merged we need to set one more code that out put also should comes with along with merge cells. i know that in my sample file i had already merged columnP but that was just for understanding purpose as output result.

    Thankyou so much.

  9. #9
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    here is another hint, if we just make code of formatting column of ColumnO or ColoumK in ColumnP so our columnP will get merged as per the coloumnO or ColumnK if then we would run that above offset substract coding then it would might be work. it was just suggestion,

    thankyou and pls correct me if i am wrong.

  10. #10
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: how to substract merging cells

    You need to manually put a number, say 1, in the cell col O, right below the last merge cells area, in this case cell O17, then run this code:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    I just tried below code first formatted the columnP and then tried your code, that's working fine.

    thankyou so much, for everyone.


    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    wow you made it very easy thankyou so much...problem solved.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,720

    Re: how to substract merging cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  14. #14
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    Done, mark as solved. it's feeling like i have achieved or find something real. LOL...

    well thanks everyone and so much respects for every developer.

    Have a good day !!!

  15. #15
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: how to substract merging cells

    Any way
    Since you asked me
    This my contribution
    Please Login or Register  to view this content.
    Might be faster

  16. #16
    Registered User
    Join Date
    12-20-2020
    Location
    India
    MS-Off Ver
    Ms Office - 2007
    Posts
    34

    Re: how to substract merging cells

    Thankyou so much mohadin, it helps me to grow and learning fast and also in my working era.

    have a good day sir !!!

  17. #17
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: how to substract merging cells

    You are well come
    And Thank 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. Substract cells NOT values in a cell (put it in reverse order)
    By olga6542 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2020, 12:44 PM
  2. Add and Substract
    By Radheshyam in forum Excel General
    Replies: 7
    Last Post: 10-31-2018, 12:00 PM
  3. [SOLVED] How to substract if cells matches
    By philion_91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2017, 09:44 AM
  4. [SOLVED] Macro: add x value to cellA and prompt to substract x to other cells
    By _Mani__ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2016, 11:28 AM
  5. Merging cells/merging cell content.
    By rhintintin in forum Excel General
    Replies: 3
    Last Post: 09-23-2010, 10:42 AM
  6. Replies: 2
    Last Post: 05-31-2010, 03:23 PM
  7. [SOLVED] How do I substract numbers in range like this: Substract(a1..a10)
    By Paulo in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-17-2005, 12:50 AM

Tags for this Thread

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