Vba Codes Excel
Vba Codes Excel
Vba Codes Excel
Presents
Im on a mission.
And, my mission is to help people & learn
Microsoft Excel.
Puneet Gogia
ExcelChamps.com
Important Message
This copy is purely dedicated to you.
You can use it in several ways. Save it
in your laptop, mobile, take a printout,
and please, no need to say thanks.
ExcelChamps.com
Table of Content
1. create a backup of a current workbook 52. closing message
2. close all workbooks at once 53. convert date into day
3. hide all but the active worksheet 54. convert date into month
4. unhide all hidden worksheets 55. convert date into year
5. delete all but the active worksheet 56. remove time from date
6. copy active worksheet into a new 57. remove date from time
workbook 58. add header/footer date
7. protect all worksheets instantly 59. add custom header
8. convert all formulas into values 60. disable getpivotdata
9. remove spaces from selected cells 61. change to uppercase
10. highlight duplicates from selection 62. change to lowercase
11. hide all pivot table subtotals 63. change to proper case
12. refresh all pivot tables 64. change to testcase
13. resize all charts in a worksheet 65. remove a character from selection
14. highlight the active row and column 66. relative to absolute reference
15. save selected range as a pdf 67. remove apostrophe from a number
16. create a table of content 68. highlight negative numbers
17. remove characters from a string 69. highlight specific text
18. active workbook in an email 70. add/remove decimals to numbers
19. convert range into an image 71. multiply all the values with a number
20. insert a linked picture 72. add a number in all the numbers
21. highlight top 10 values 73. calculate square root
22. add serial numbers 74. calculate cube root
23. insert multiple worksheets 75. highlight cells with comments
24. highlight named ranges 76. highlight cells with misspelled words
25. highlight greater than values 77. highlight alternate rows in the selection
26. highlight lower than values 78. protect all the cells with formulas
27. protect worksheet 79. add a-z alphabet in a range
28. unprotect worksheet 80. count open unsaved workbooks
29. convert text to upper case 81. delete all blank worksheets
30. convert text to lower case 82. convert numbers into roman number
31. insert multiple columns 83. use goal seek
32. insert multiple rows 84. count cells with error in entire worksheet
33. auto fit columns 85. count cells with a specific value in
34. auto fit rows worksheet
35. remove text wrap 86. highlight all the cells in the worksheet
36. unmerge cells which are blank but have an invisible
37. change chart type space.
38. paste chart as an image 87. highlight max value in the range
39. add chart title 88. highlight min value in the range
40. reverse text 89. highlight unique values
41. sort worksheets 90. open a workbook
42. add workbook to a mail attachment 91. show progress on status bar
43. activate r1c1 reference style 92. disable page breaks
44. activate a1 reference style 93. highlight difference in columns
45. open calculator 94. highlight difference in rows
46. use text to speech 95. print comments
47. activate user form 96. print selection
48. insert timestamp 97. print narrow margin
49. create pivot table 98. print custom pages
50. update pivot table range 99. remove negative numbers
51. welcome message 100. replace blank cells with zeros
1. create a backup of a current workbook
Sub FileBackUp()
ThisWorkbook.SaveCopyAs Filename:=ThisWorkbook.Path & _
"" & Format(Date, "mm-dd-yy") & " " & _
ThisWorkbook.name
End Sub
Sub InsertMultipleSheets()
Dim i As Integer
i = InputBox("Enter number of sheets to insert.", "Enter Multiple
Sheets")
Sheets.Add After:=ActiveSheet, Count:=i
End Sub
Sub ActivateR1C1()
If Application.ReferenceStyle = xlA1 Then
Application.ReferenceStyle = xlR1C1
Else
Application.ReferenceStyle = xlR1C1
End If
End Sub
Sub DataForm()
ActiveSheet.ShowDataForm
End Sub
Sub deactivateGetPivotData()
Application.GenerateGetPivotData = False
End Sub
Sub convertProperCase()
Dim Rng As Range
For Each Rng In Selection
If WorksheetFunction.IsText(Rng) Then
Rng.Value = WorksheetFunction.Proper(Rng.Value)
End If
Next
End Sub