# Formula to Copy and Paste Values in Excel Automatically

Get FREE Advanced Excel Exercises with Solutions!

We find numerous values, formulas, and calculations when working with Excel. Sometimes, we need to copy and paste only the values. This will be more efficient if we can accomplish this automatically through formulas. In this article, I will show you 2 ways to create formula to copy and paste values in Excel automatically.

## Formula to Copy and Paste Values in Excel Automatically: 2 Ways

Say, you have a dataset of 4 studentsâ€™ names, subjects, and marks. Now, you want to copy these cellsâ€™ values and paste them into other cells with a formula. You can follow any of the 2 easy formulas given below to copy and paste values in Excel automatically.

### 1. Using Cell Reference

#### i. From Another Sheet

First, say, you need to create an exact sheet like the sample dataset by copying and pasting values from the Sample Dataset sheet in Excel automatically. Follow the steps below to do this.

ðŸ“Œ Steps:

• First and foremost, click on cell B5 and insert the following formula.
`='Sample Dataset'!B5`
• Subsequently, press the Enter key.

• Afterward, place your cursor in the bottom right position of the cell.
• Consequently, a black fill handle will appear.
• Following, drag the fill handle below to copy the same formula dynamically for all the cells below.

• Thus, all the cells of the Sample Dataset sheetâ€™s Name column have been copied and pasted through the formula in the new sheet.

• Now, for the Subject column, click on cell C5 and insert the following formula.
`='Sample Dataset'!C5`
• Subsequently, hit the Enter key.

• Afterward, use the fill handle feature below to fill the Subject column cells.

• Last but not least, click on cell D5 and write the formula in the formula bar.
`='Sample Dataset'!D5`
• Following, hit the Enter key.

• Thus, the D5 cell of the Sample Dataset will be copied and pasted as a value with the formula in Excel automatically in the new sheet.
• Afterward, use the fill handle feature to copy the same formula to copy and paste values in Excel automatically for the Marks column.

Finally, the same dataset is created automatically through the formula to copy and paste values into Excel. And, the final result would look like this.

#### ii. Inside a Single Sheet

Now, you need to copy a value from one cell and paste it into another cell into a single sheet. For like, you need to showcase the subjects and marks for Adam which are in C14:D14 cells. Follow the steps below to create a formula to copy and paste values in Excel automatically within a single sheet.

ðŸ“Œ Steps:

• First, click on cell F6.
• Following, insert the formula below and press the Enter key.
`=C14`

• Afterward, use the fill handle feature to copy the formula for all the cells below.

• Similarly, for the Marks column, Click on cell G6 and insert the following formula.
`=D14`
• Subsequently, hit the Enter key.

• Afterward, use the fill handle feature to copy the formula below to fill all the cells.

Thus, you will have your desired result and it looks like this.

### 2. Creating a Formula in VBA to Copy and Paste Values in Excel Automatically

Another way to create a formula to copy and paste values in Excel automatically is to use a VBA formula. Follow the steps below to do this.

ðŸ“Œ Steps:

• At the very beginning, go to the Developer tab >> Visual Basic tool.

• As a result, the VB Editor window will open.
• Subsequently, go to the Insert tab >> Module option.

• As a result, a new module will be created as Module 1.
• Following, double-click on Module 1 and insert the following VBA code inside the editor.
``````Sub Formula_to_copy_and_paste()
Â Â Range("C14:C16").Copy Range("F6:F8")
Â Â Range("D14:D16").Copy Range("G6:G8")
End Sub``````
• Subsequently, press Ctrl + S on your keyboard.

• As a result, a Microsoft Excel dialogue box will appear.
• Subsequently, click on the No button.

• At this time, the Save As dialogue box will appear.
• Following, choose the Save as type: as .xlsm file and click on the Save button.

• Afterward, close the VB Editor window.
• At this time, go to the Developer tab >> Macros tool.

• As a result, the Macro window will appear.
• Following, choose your created macro from the Macro name: options and click on the Run button.

Thus, you will get your desired result by creating a formula to copy and paste values in Excel automatically. And, the output should look like this.

Note:

The code is written to copy C14:D16 cells and paste them into F6:G8 cells. You can change the codeâ€™s cell references as per your need from the VB Editor.

## Conclusion

So, in this article, I have shown you 2 easy formulas to copy and paste values in Excel automatically. I suggest you read the full article carefully and practice accordingly. I hope you find this article helpful and informative. You are welcome to comment here if you have any further questions or recommendations.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , and premium Excel consultancy services for Excel and business users. Feel free to contact us with your Excel projects.
Tanjim Reza

Hello! I am Md. Tanjim Reza Tanim. I have just completed my B.Sc from Naval Architecture & Marine Engineering Department, BUET. Currently, I am working as an Excel & VBA content developer. I always had a great fascination with Microsoft Excel and its cool functions and formulas. Here, I am learning every day about new functions and formulas and working on applying MS Excel to the analysis of our real-life problems. I have great enthusiasm for learning any kind of new things, writing articles, and solving real-life problems.

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF