Kamis, 29 September 2011

Re: [ExcelVBA] formula with IF, AND, and OR all in one

 

Hello all,

I have a row of numbers, say:

  B C D E F G H I
1 112 83 126 94 98 110 67 89
2     start formula in cell D2          
 
In each cell, for three consecutive cells, I wish to test two conditions, so that in cell D2, the start of my formula, I am testing each cell B1, C1, and D1 for the two conditions that follow:
 
IF cell B1 is less than 95 OR greater than 110 AND
cell C1 is also less than 95 OR greater than 110 AND
cell D1 is also less than 95 OR greater than 110, put "Y" for YES or "N" for NO.
 
So this same logical statement would apply as in E2, however, it would test for the two conditions mentioned above (<95 OR >110) on cells C1, D1, and E1.  Cell F2 would test for the same conditions but on/for cells D1, E1, and F1, etc
 
What is the syntax for this?  I know the correct logic in terms of words, but I cannot get this syntax to work.
 
Please help, and Thank you in advance for everyone's contribution.
 
Eric Lutz

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar