I’m trying to use VBA to test if cell (in the active row) [C] has no number in it or is blank, and also test if [F] has a number in it. If true then copy the condense of [F] to [M].
Everything seems to work until it get to the last line “copy “F” to M” I get a #NAME error.
Thanks.
End Sub
[/code]
Thanks.
Everything seems to work until it get to the last line “copy “F” to M” I get a #NAME error.
Thanks.
Code:
Sub CopyTo_M()
'
If (Range("C" & ActiveCell.Row).Value > 0)And (IsNumeric(Range("c" & ActiveCell.Row).Value) OrApplication.WorksheetFunction.IsText(Range("c" &ActiveCell.Row).Value)) Then
Range("m" & ActiveCell.Row).Value = "E XI T -C is not empty"
Exit Sub
ElseIf (Range("F" & ActiveCell.Row).Value >0) And (IsNumeric(Range("F" & ActiveCell.Row).Value)) Then
Range("m" & ActiveCell.Row).Value ="F IS numberic, C is blank"
Range("m" & ActiveCell.Row).Formula ="=+sum(f)" '<--ERROR==========
Else
Range("m" & ActiveCell.Row).Value = "Cand F are empty"
End If
END SUB
End Sub
[/code]
Thanks.