+ Reply to Thread
Results 1 to 6 of 6

increasing cell values by a percentage

  1. #1
    Forum Contributor
    Join Date
    12-30-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    143

    increasing cell values by a percentage

    Hi there,

    I need a code that would do the following.

    I have selected some merged cells, i would like to increase the values of those merged cells by a certain percentage for ex. 5 percent.

    The regular way of paste special/multiply wont work because its merged.

    Is there another way with vba. ?

    if possible to have an input box to enter the percentage.


    Thanks

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: increasing cell values by a percentage

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: increasing cell values by a percentage

    Try:
    Please Login or Register  to view this content.
    In inputbox both
    5%
    and
    0.05
    are accepted

    this "strange replace" is required as I vale localized version with comma as decimal separator. It could be that in US version it is not required

    PS. I noticed after publishing John's code - it will probably (not tested) change empty cells into zeros. But on other hand it refers to Selection - indeed it is in your post, so please change usedrange to selection in the above code.
    Last edited by Kaper; 09-26-2017 at 08:26 AM. Reason: comments after seeing John's answer
    Best Regards,

    Kaper

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: increasing cell values by a percentage

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-30-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    143

    Re: increasing cell values by a percentage

    Quote Originally Posted by Kaper View Post
    Try:
    Please Login or Register  to view this content.
    In inputbox both
    5%
    and
    0.05
    are accepted

    this "strange replace" is required as I vale localized version with comma as decimal separator. It could be that in US version it is not required

    PS. I noticed after publishing John's code - it will probably (not tested) change empty cells into zeros. But on other hand it refers to Selection - indeed it is in your post, so please change usedrange to selection in the above code.
    HI

    is it possible to add to your code that i should not have to input the percentage symbol i should just input 5 or 10 etc ..

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: increasing cell values by a percentage

    try:
    Please Login or Register  to view this content.
    or if only selected cells are to be affected:
    Please Login or Register  to view this content.

+ 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] Increasing the cell values by 1
    By LAVA2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2014, 09:57 PM
  2. [SOLVED] Increasing percentage exponentially
    By PMI_PROJECTS in forum Excel General
    Replies: 6
    Last Post: 11-25-2014, 11:23 AM
  3. Replies: 1
    Last Post: 01-13-2013, 08:39 PM
  4. Increasing a percentage on values
    By geovannavp in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 10-12-2011, 01:25 AM
  5. Increasing cell values with offset?
    By grounded in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2008, 02:08 AM
  6. [SOLVED] increasing percentage
    By S S in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2006, 01:00 PM
  7. [SOLVED] Increasing numbers in a column by percentage
    By dekare in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2005, 04: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