Thread: StrComp numeric
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default StrComp numeric

If you want to compare two numbers

If target.Offset(0,-3).Value 21 then

If you mean case sensitive
replace vbTextCompare with
vbBinaryCompare

Natrually strcomp is for comparing strings.

--
Regards,
Tom Ogilvy



"Rick" wrote:

When using this VB function :
If StrComp(Target.Offset(0, -3).Text, "Debit", vbTextCompare) = 0 Then

How do I turn it into a numeric test?