In this chapter you will learn, how to change all the cells in the active sheet to values, using VBA in Microsoft Excel.
Let’s take an example and understand how we write the VBA code.
How to change the value from column to column?
We have data in Excel in which Column A and column B contains some values, now we want to replace values in Column A values with the values in column B.
Follow these steps:
Sub Values_8() Columns("A").Value = Columns("B").Value End Sub
How to change the value from columns to columns?
We have data in Excel in which Column A, B and C contains some values in a group and Column E, F and G contain values in 2nd group, now we want to change the value of 1st group with the 2nd group.
To change the value follow below given steps and code:
Sub Values_9() Columns("A:C").Value = Columns("E:G").Value End Sub
If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.
We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at info@exceltip.com
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.