Last active
April 16, 2017 15:29
-
-
Save ateneva/8de59b0b84eb3eddad5fb6d5951cd443 to your computer and use it in GitHub Desktop.
Zap formulas based on cell value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ZapValuesNoUserInput() | |
Dim Cell As Range | |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
'written by Angelina Teneva, September 2016 | |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
'paste special as values | |
For Each Cell In ActiveSheet.Range("AB2:AB" & ActiveSheet.UsedRange.Rows.Count) | |
On Error Resume Next | |
If Cell.Value <> "0" And Len(Cell) > 1 Then | |
Cell.Activate | |
ActiveCell.Copy | |
ActiveCell.PasteSpecial xlPasteValuesAndNumberFormats | |
End If | |
Next Cell | |
Application.CutCopyMode = False | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment