Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default StrComp numeric

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default StrComp numeric

Thanks Tom: I was thinking in the same direction, but did not realize .value
0 would work.


"Tom Ogilvy" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
StrComp Rick Excel Programming 4 August 17th 07 11:48 PM
Find and Return Numeric Label based on (Numeric Value) Criterion Sam via OfficeKB.com Excel Worksheet Functions 2 September 18th 06 11:20 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 3 December 30th 05 08:01 PM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 0 December 29th 05 08:44 PM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"