bbrimberry
New Member
- Joined
- Mar 23, 2016
- Messages
- 34
I'm hoping someone could help me solve this type mismatch error.
I have is the simple macro below.
how can I solve for an #N/A in the selection? I would like an #N/A just to be a 0
if there is an #N/A in the selection I get a type mismatch error
Sub cellfix
For Each cell In Selection
If cell = " " Then Exit For
If cell = "" Then Exit For
cell.Value = "'" & Right("0000000" & cell.Value, 7)
Next
End Sub
I have is the simple macro below.
how can I solve for an #N/A in the selection? I would like an #N/A just to be a 0
if there is an #N/A in the selection I get a type mismatch error
Sub cellfix
For Each cell In Selection
If cell = " " Then Exit For
If cell = "" Then Exit For
cell.Value = "'" & Right("0000000" & cell.Value, 7)
Next
End Sub