I downloaded a spreadsheet from another software program. In that spreadsheet I have a formula that references a cell to the left of the cell with the formula. The formula does not calculate properly because there is a hidden value in the cell being referenced. When I press the delete button on the cell with the hidden value, the formula works properly.
I don't want to delete the values from all of the cells in the column but only the ones that look empty but have a hidden value in them. I want to keep the cells in tact that have values that I could see. I tried using this macro that I found on the internet but I get the debug screen when I try to run the macro. It highlights "If usedrng.Value = "" Then". I take it that the VBA is telling me that is where the error is. I don't know how to wright code yet and I need some help. If there is someone that could help me, I would appreciate it.
Thank you,
I don't want to delete the values from all of the cells in the column but only the ones that look empty but have a hidden value in them. I want to keep the cells in tact that have values that I could see. I tried using this macro that I found on the internet but I get the debug screen when I try to run the macro. It highlights "If usedrng.Value = "" Then". I take it that the VBA is telling me that is where the error is. I don't know how to wright code yet and I need some help. If there is someone that could help me, I would appreciate it.
Thank you,
Code:
[COLOR=#26282A][FONT="Helvetica"]Sub clear_empty_cell()[/FONT][/COLOR]
[FONT=Calibri][SIZE=3][COLOR=#000000]
Dim usedrng As Variant
Worksheets("ABC").Range("E1:E20").Select
For Each usedrng InActiveSheet.UsedRange
If usedrng.Value ="" Then
usedrng.ClearContents
End If
Next
End Sub[/COLOR][/SIZE][/FONT]