Copying/Pasting Cells in Excel VBA

Cut, Copy and Paste is important part of our life. I think anybody who spends his/her more than one third of a day in front of computer screen is no new to the three words. One will use them very frequently in excel too. Here is simple piece of code (VB Code) which helps one to do the same. Though it self explanatory, still I will put my comments wherever I feel it is required.


We need to copy the data from sheet MSFT stock data to DATA.

This piece of code will do the needful.

Sometimes, we see "Paste Special" option in excel. Now, I will show you how to do the same in Excel using VBA. Suppose, I wish to copy date and paste it's transpose in sheet DATA. Following piece of code will suffice this job.

 Sometime one may require to copy an dpaste a sheet from one workbook to another. This can be done using following piece of code.

Hope this helps everybody to save their precious time.