Add same number to a range of cells

How to add the same number to a range of cells using Excel and VBA methods

METHOD 1. Add same number to a range of cells using paste special

EXCEL

Select the number that you want to add > Copy > Select the range that you want to add to > Select the Home tab > Clipboard group > Click Paste > Click Paste Special > Select All > Select Add > Click OK

In this example we will add the number captured in cell E3 (5) to all of the values in range (B3:C7). This image shows the starting point without any adjustments. Original values without adjustments

1. Select the cell that captures the number that you want to add to the range of numbers.
2. Copy the selected cell.
Note: in this example we are adding 5 to the range of numbers, which is captured in cell E3.
To copy the cell you can use the shortcut method by pressing Ctrl + C keys simultaneously.
Select cell with number to add and copy

3. Select the range of cells that captures the numbers that you want to add to.
Note: in this example we are adding to the range of numbers captured in range (B3:C7).
Select the range of cells that you want to add to

4. Select the Home tab. Select Home tab - Excel 2016

5. Click on Paste in the Clipboard group.
6. Click on Paste Special.
Click Paste and click Paste Special

7.Select the All option in the Paste section.
8. Select the Add option in the Operation section.
9. Click OK.
Select All, select Add and click OK

This image shows the final outcome of the process explained above. All of the numbers in range (B3:C7) reflect the revised number after having a value of 5 added onto them. Final outcome

METHOD 2. Add same number to a range of cells using formula

EXCEL

Add same number to a range of cells

=B8+$B$5
The formula adds the number in cell B5 to the value in cell B8. Cell B5 has been treated as an absolute row and column, given we have applied $ signs in front of the row and column reference. This will allow you to drag the formula down to row 12 and column F without adjusting the B5 cell reference, which captures the number that we are adding.

METHOD 1. Add same number to a range of cells using VBA

VBA

Sub Add_same_number_to_a_range_of_cells()
'declare variables
Dim ws As Worksheet
Dim rng As Range
Dim myVal As Range
Set ws = Worksheets("Analysis")
Set rng = ws.Range("B3:C7")
For Each myVal In rng

myVal = myVal.Value + ws.Range("E3")

Next myVal

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named Analysis.
Value Range: If using the same VBA code the range of values that you want to add to needs to be captured in range ("B3:C7") in the Analysis worksheet.
Number to add: If using the same VBA code the number that you want to add to the range of values needs to be captured in cell ("E3") in the Analysis worksheet.
ADJUSTABLE PARAMETERS
Value Range: Select the range of values that you want to add by changing the range reference ("B3:C7") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Number to add: Select the number that want to add to the range of values by changing the value in cell ("E3") or changing the cell reference ("E3"), in the VBA code, to any cell in the worksheet that captures the number that you want to add and doesn't conflict with formula.

ADDITIONAL NOTES
Note 1: The VBA code returns the adjusted numbers in the same range where the numbers that you are adding to are captured.

Explanation about how to add same number to a range of cells

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to add the same number to a range of cells using Excel and VBA methods.

Excel Methods: Using Excel you can add to a range of cells by the same number using either the paste special option or a formula. Using the paste special approach the existing values that you want to add to will be replaced with the revised numbers. Using the formula approach the results will need to be presented in a different range. In this example, using the formula method, the results are captured in range E8:F12.

VBA Method: The VBA method in this tutorial shows how to automate this process. The results for this example replace the existing numbers that you are adding to. This derives with the same result as the Excel (paste special) method.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to subtract the same number from a range of cells using Excel and VBA methods
How to multiply a range of cells by the same number using Excel and VBA methods
How to divide a range of cells by the same number using Excel and VBA methods