mayankjoin3

DeleteAllFormulas Excel

Jun 23rd, 2026
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub DeleteAllFormulas()
  2.  
  3.     Dim ws As Worksheet
  4.  
  5.     For Each ws In ThisWorkbook.Worksheets
  6.         On Error Resume Next
  7.         ws.UsedRange.SpecialCells(xlCellTypeFormulas).ClearContents
  8.         On Error GoTo 0
  9.     Next ws
  10.  
  11.     MsgBox "All formulas have been deleted from all worksheets.", vbInformation
  12.  
  13. End Sub
Advertisement
Add Comment
Please, Sign In to add comment