Hi Arora, Aman

Blank cells is equals to vbNullString or "", but " " is equals to one space
character.

Function check(EMP As String, BRANCH As String, TPE As String)
 If EMP = "SALARIED" And TPE = "1" And BRANCH = vbnullstring Then   '
LenB(Trim(BRANCH))=0
        check = "OK"
 ElseIf EMP <> "SALARIED" And TPE = "1" And BRANCH = vbNullString Then  '
LenB(Trim(BRANCH))=0
        check = "not ok"
    End If
End Function

using "" is slower rather than use vbNullString
using LenB(Trim(BRANCH))=0 is more faster and will compare one space
character same as vbnullstring


good luck,
kid


2009/2/6 Arora, Aman (GE Money) <[email protected]>

>    Hi,
> Please help, Function is not picking blank cell. enclosed dummy data
>
> Regards
> Aman S Arora
>  
>

Kirim email ke