garywood84
New Member
- Joined
- Jan 31, 2010
- Messages
- 24
I have a macro that I've recorded which copies and uses paste special to insert some data generated by formulae. Some of the cells are set by the formula to be blank, with "". However, those cells are not truly empty. So, on the pasted data, I want to run a further VBA script to find all "" cells and clear their contents. I found this code online, but can't get it to work:
Can anyone help me, please?
VBA Code:
For Each cell in Range("A1:L10003")
If (cell.value = "") Then cell.ClearContents
Next
Can anyone help me, please?