Please Note: This article is written for users of the following Microsoft Excel versions: 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Adjusting Values with Formulas.

Written by Allen Wyatt (last updated May 6, 2024)
This tip applies to Excel 2010, 2013, 2016, 2019, and Excel in Microsoft 365

There are times that you need to adjust the values stored in the cells of a worksheet. Most times, the tools provided by Paste Special will fit the bill just fine. For instance, you can use Paste Special to multiply or divide the values in a range of cells, as described in other issues of ExcelTips.

There is a drawback to using Paste Special, however—it changes the actual value, which you might not want to happen. Why? Because four months after making the adjustment to the values, you might not remember exactly what you did, or what the starting values were.

For this reason, you may find it more desirable to replace values with formulas that indicate what was done with your adjustment. For instance, you may have the value of 100 in cell B3, and you want to increase it by 10%. Using Paste Special you can easily change it to 110, but you may instead want to replace the value with the formula =100*1.1. With such a formula, there would be no question four months from now about the starting value or what you did to it.

The only way to adjust values with formulas is to use a macro, such as the following one:

```Sub Adjust()
Dim c As Range
Dim sMod As String

If sMod > "" Then

For Each c In Selection
If c.HasFormula Then
c.Formula = "=(" & Mid(c.Formula, 2) & ")" & sMod
Else
c.Formula = "=" & c.Value & sMod
End If
Next c
End If
End Sub
```

To use this macro, select the cells you want to adjust, and then run it. You are asked for a formula to add to the cells. As an example, if you wanted to multiply the cells by 1.1, you would enter *1.1 (the asterisk multiplication symbol, followed by 1.1). The macro then steps through each selected cell and makes the adjustments. If the cell contains a formula, then the formula is adjusted as you specified. If the cell contains anything else, then it is turned into a formula that includes your adjustment.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9486) applies to Microsoft Excel 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Adjusting Values with Formulas.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Moving Custom Formats to Number Formatting Categories

Moving your custom formats into a formatting category other than "custom" isn't something you can do in Excel. Here's ...

Discover More

Calculating Time Differences between Two Machines

Want to know how much of a time difference there is between your machine and a different machine? This tip provides some ...

Discover More

Finding Text at the End of a Table Cell

How do you use Find and Replace to locate information at the end of a table cell? Interestingly enough, there is no way ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

##### More ExcelTips (ribbon)

Macros in Two Workbooks Interfere with Each Other

Having macros in multiple open workbooks can sometimes produce unexpected or undesired results. If your macros are ...

Discover More

Selecting Visible Cells in a Macro

Many times you need to select just the visible cells before taking some action. It is helpful to know how to make this ...

Discover More

Positioning a Column on the Screen

If you have static columns and dynamic columns on the screen, you may want the dynamic columns to always show a ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 3 + 0?

2019-07-13 13:04:33

Willy Vanhaelen

@Leslie Glasser
Interesting alternative for the macro with 2 advantages:
- strings are ignored (the macro generates an error)
- you can undo the operation (you cannot with a macro).

I even discovered that if you enter e.g. =1.1 in a cell intead of 1.1 then you don't have to enter your values with an equal sign. As in your example 99 becomes =(99)*(1.1).

2019-07-12 04:14:20

Leslie Glasser

A simple way to achieve the same end (for example, showing "*1.1" with values) is to ensure that the original data are entered with an equals sign, as in a formula, e.g., =99. Put 1.1 in a separate cell, copy it, then select the cells to be adjusted, Paste Special, and choose Multiply. The cell =99 becomes =(99)*1.1 and displays 108.9!

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."