View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default Urgent help in excel macros

The answer depends on how you want to do the comparison. If you want
to do a alphanumeric comparison you may want to ensure that the lengths
of all strings are the same and follow Roger's suggestion.

If, on the other hand, the comparison is based on the numeric part of
the tokens, consider something like:

Suppose the min. value AAA_0001 is in C2 and the corresponding max.
value is in D2. Suppose your test value is in E2. Then, to check your
value is greater than the min. use =0+MID(E2,5,1024)0+MID(C2,5,1024).
To check it is less than the max. use
=0+MID(E2,5,1024)<0+MID(D2,5,1024). Suppose the min. comparison result
is in F2 and the max. comparison result is in G2. Then, in H2 use the
AND() function to combine the two parts.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

I am having the minimum and maximum values in two columns in an excel
spread sheet.I need to check whether the given value falls between the
maximum and minimum values.

For e.g Minimum column contains value like AAA_0001 and Maximum column
contains AAA_1000
Let the given value be AAA_560.I need to check whether this value is
between those two columns.
Could anyone help me out in solving this .....?


regards
Jayanthi


--
Jayanthi
------------------------------------------------------------------------
Jayanthi's Profile:
http://www.excelforum.com/member.php...o&userid=30035
View this thread: http://www.excelforum.com/showthread...hreadid=497229