VBA for deleting data in row but not formulas
Solved/Closed
Debs269
Posts
21
Registration date
Monday October 15, 2012
Status
Member
Last seen
August 18, 2016
-
Oct 15, 2012 at 06:50 AM
Debs269 Posts 21 Registration date Monday October 15, 2012 Status Member Last seen August 18, 2016 - Oct 31, 2012 at 07:24 AM
Debs269 Posts 21 Registration date Monday October 15, 2012 Status Member Last seen August 18, 2016 - Oct 31, 2012 at 07:24 AM
Related:
- How to clear contents in excel without deleting formulas using vba
- Number to words in excel formula without vba - Guide
- How to delete whatsapp account without login - Guide
- 1st, 2nd, 3rd position formula in excel ✓ - Office Software Forum
- Date formula in excel dd/mm/yyyy - Guide
- Vba case like - Guide
7 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 15, 2012 at 09:20 AM
Oct 15, 2012 at 09:20 AM
Hi Debs,
Once you have implemented the code below, select a cell from the row you want to keep the formula's from and run the code.
Best regards,
Trowa
Once you have implemented the code below, select a cell from the row you want to keep the formula's from and run the code.
Sub KeepFormulas() Dim sRow, lCol As Integer sRow = ActiveCell.Row lCol = Cells(sRow, Columns.Count).End(xlToLeft).Column For Each cell In Range(Cells(sRow, 1), Cells(sRow, lCol)) If cell.HasFormula = False Then cell.ClearContents Next cell End Sub
Best regards,
Trowa