Excel - Copy and Paste Total in Excel: Simple Macro Solution - Episode 936
598 views · Published 26 January 2009 · 3:46 · Indexed 20 September 2026
Channel: MrExcel.com · 2009 · Education
Microsoft Excel Tutorial: Copy and Paste Total in Excel: Simple Macro Solution. Welcome back to the MrExcel netcast! In today's video, we will be addressing a question sent in by Pablo, and let me tell you, it's a great one. Pablo wonders why Microsoft never thought of a simple functionality like being able to copy and paste the total of selected cells in Excel. Well, I couldn't agree more with Pablo, and in this video, I will show you how to achieve this using just a tiny bit of macro code. First, we will go into the Office button and enable the DEVELOPER tab in the ribbon. Then, we will go to the DEVELOPER tab and click on VISUAL BASIC. I have written two simple macros for this functionality - one to copy the total and one to paste it. In order to make VBA remember the total between the two macros, we will need to declare a global variable at the top. This is a bit unusual as variables usually disappear once the macro finishes, but in this case, we want it to stay. To make it even more convenient, I have assigned keyboard shortcuts to these macros - CONTROL+SHIFT+C for the copy macro and CONTROL+SHIFT+V for the paste macro. Now, all you have to do is select the cells you want to get the total of, press CONTROL+SHIFT+C, and then go to a new cell and press CONTROL+SHIFT+V to paste the total. It's that simple! This is a great workaround until Microsoft decides to add this functionality to Excel. One thing I couldn't figure out was how to determine which quick sum feature is being shown in the status bar. It would have been great to have the macro automatically adjust to show the appropriate function, but unfortunately, Microsoft doesn't provide that information. However, you can always create separate macros for different functions like AVERAGE, COUNT, MIN, and MAX. So, thank you, Pablo, for this great question and I hope this solution helps you and others who have been wanting this functionality in Excel. Thank you for watching this netcast from MrExcel. If you found this video helpful, please give it a thumbs up and don't forget to subscribe to our channel for more Excel tips and tricks. Also, let us know in the comments if you have any other questions or suggestions for future videos. See you next time! Buy Bill Jelen's latest Excel book: https://www.mrexcel.com/products/latest/ You can help my channel by clicking Like or commenting below: https://www.mrexcel.com/like-mrexcel-on-youtube/ Pablo sends in a great question: why can't you copy a range of cells and paste only the total of those cells in a new cell? Microsoft should really add this functionality, but in the meantime, 2 lines of macro code solve the problem. Episode 936 shows you how. This video is the podcast companion to the book, Learn Excel 97-2007 from MrExcel. Download a new two minute video every workday to learn one of the 377 tips from the book! Table of Contents: (00:00) Introduction (00:13) Addressing a question from Pablo (00:23) Pablo's question about Excel functionality (00:34) Solution using macro code (00:46) Enabling Developer tab and accessing Visual Basic (01:04) Explanation of the two macros (01:21) Global declaration for variable (01:35) Customizing macros for easier use (02:03) Demonstration of the solution (02:14) Suggestion for Microsoft to add this functionality (02:30) Limitations of the solution (03:08) Alternative solution for different functions (03:18) Clicking Like really helps the algorithm #excel #microsoft #microsoftexcel #exceltutorial #exceltips #exceltricks #excelmvp #freeclass #freecourse #freeclasses #excelclasses #microsoftmvp #walkthrough #evergreen #spreadsheetskills #analytics #analysis #dataanalysis #dataanalytics #mrexcel #spreadsheets #spreadsheet #excelhelp #accounting #tutorial This video answers these common search terms: Average calculation in Excel Copy and paste in Excel Excel 2012 Excel functionality Excel macros Excel options Excel status bar Global variable declaration in VBA Quick sum feature in Excel Visual Basic for Applications (VBA) Join the MrExcel Message Board discussion about this video at https://www.mrexcel.com/board/threads/1152102/
More from this channel
-
3:57
Excel 2007 - Color of Selected Sheets is too much like unselected sheets - Episode 907
-
2:48
Excel - Adding Equals Icon to Excel QAT - Build Formula with Mouse - Episode 911
-
2:37
Excel - Enhance Your Excel Charts: Add a Picture as a Background in Excel - Episode 917
-
2:00
Excel Hiding Data in Plain Site - Episode 919
-
2:20
Excel - Bring Back The Full Excel 2003 Dialogs In Excel! - Episode 920
-
2:33
Excel - Why Have Three Worksheets In Every New Excel Workbook? Episode 921
-
2:12
Excel - MrExcel Tenth Anniversary Survey - Episode 877.5
-
3:37
Excel - Master the Camera Tool in Excel - Easily Align Numbers with Cartesian Grid - Episode 883