Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Logical Comparison of Two cells

i have two cells of data. I need to do a logical
comparison of both cells. More graphically.

A1 B1
1.25 .36

I need to look at both of these cells simultaneously and
return either a 'yes' or 'no' depending on a defined set
of criteria.

If A1 is less than 1.15 and B1 is greater than .40, I need
a 'NO'
If A1 is greater than or equal to 1.15 and B1 is less than
or equal to .40, then 'Yes'

I have been unable to get any of the IF conditional
statemnts to work. I appreciate ANY advice given.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Logical Comparison of Two cells

What about if A1 is less than 1.15 and B1 is less than 0.4, or if A1 is
greater than 1.15 and B1 is greater than 0.4?

A literal interpretation of your criteria is

=IF(A1<1.15,IF(B10.4,"NO","Undefined"),IF(B1<0.4, "Yes","Undefined"))



In article ,
"Rocky Perkins" wrote:

i have two cells of data. I need to do a logical
comparison of both cells. More graphically.

A1 B1
1.25 .36

I need to look at both of these cells simultaneously and
return either a 'yes' or 'no' depending on a defined set
of criteria.

If A1 is less than 1.15 and B1 is greater than .40, I need
a 'NO'
If A1 is greater than or equal to 1.15 and B1 is less than
or equal to .40, then 'Yes'

I have been unable to get any of the IF conditional
statemnts to work. I appreciate ANY advice given.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Logical Comparison of Two cells

Rocky,

This should work either as a formula, or in code:

=IF(AND(A1<1.15,B10.4),"No",IF(AND(A1=1.15,B1<=0 .4),"Yes","Neither"))

- Or -

If Range("A1") < 1.15 And Range("B1") 0.4 then
MsgBox ("No")
elseif Range("A1") = 1.15 And Range("B1") <= 0.4 then
MsgBox ("Yes")
else MsgBox ("Neither")
End If

hth
--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"Rocky Perkins" wrote in message
...
i have two cells of data. I need to do a logical
comparison of both cells. More graphically.

A1 B1
1.25 .36

I need to look at both of these cells simultaneously and
return either a 'yes' or 'no' depending on a defined set
of criteria.

If A1 is less than 1.15 and B1 is greater than .40, I need
a 'NO'
If A1 is greater than or equal to 1.15 and B1 is less than
or equal to .40, then 'Yes'

I have been unable to get any of the IF conditional
statemnts to work. I appreciate ANY advice given.




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
Logical function with multiple cells Demosthenes Excel Worksheet Functions 6 May 8th 10 02:20 AM
Logical Test with multiple cells Deanna Excel Worksheet Functions 2 October 20th 08 03:34 AM
Multiple Logical Conditions With Date and String Comparison Not wo Anurag Excel Worksheet Functions 3 November 1st 07 06:48 PM
Text comparison in adjacent cells Andy Excel Discussion (Misc queries) 3 January 23rd 06 05:58 PM
Logical Test comparison using cell color chamuko Excel Discussion (Misc queries) 2 November 9th 05 03:09 AM


All times are GMT +1. The time now is 02:38 PM.

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

About Us

"It's about Microsoft Excel"