Hi Team,
I am checking are there any string value "-" in a Columns. Using countif.
its not working, getting wrong number of argument or invalid property.
Thanks
mg
Thanks
mg
I am checking are there any string value "-" in a Columns. Using countif.
its not working, getting wrong number of argument or invalid property.
VBA Code:
With ws_Master
lr_new = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For i = 0 To UBound(Arys) '10 columns
'Count_Dash = WorksheetFunction.CountIf(.Range(.Cells(5, Arys(i)), .Cells(lr_new, Arys(i)), "" - "")) 'not working
Count_Dash = "=COUNTIF(R5C" & Arys(i) & ":R" & lr_new & "C" & Arys(i) & ",""-"")" ''not working
Count_Dash = WorksheetFunction.CountIf(.Range(.Cells(5, Arys(i)), .Cells(lr_new, Arys(i)), "" - "")) ''not working
If Count_Dash > 0 Then
MsgBox "Found string in Amount columns " & Arys(i) & " columns", vbCritical
End If
Next i
End With
Thanks
mg
Thanks
mg