• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vba simple question

Bestmiler

New Member
hi guys
I'm new to this site

I have a vba question. Hopefully you guys can help me out.

I need the code to do the following: let me know if there are any 0 or blank values in column k. The result would be to let me know through a message box if there is or is not any 0 or blank values.

Thanks,
Bestmiler
 
Hi Narayank991, thank you very much.

I have another question. Trying to attempt this myself. Well I want to just know if there are any 0's in a column with numbers. This is my code so far but I'm getting an 'Run-time error 13: Type mismatch. Any help would be great.

Code:
Sub FindingZeros()
'
' FindingZeros Macro
'

'
    Columns("K:K").Select
    Set cell = Selection.Find(What:="0", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate
   
    If Not cell Is Nothing Then
        MsgBox "There are 0 terms"
   
    Else
        MsgBox "There are no 0 terms"
   
    End If
           
End Sub

Mod Edit: Add Code tags
 
Last edited by a moderator:
Another way :​
Code:
    With Range("K1", Cells(Rows.Count, 11).End(xlUp))
        V = Application.Match(0, .Cells, 0)
        If IsError(V) Then MsgBox "No zero …" Else Beep: .Cells(V).Select
    End With
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top