LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 130
Default Combining formulas, "and" & "or" to verify content of multiple

Ron, thanks for helping with this formula but I still am not able to produce
the correct answer as seen in AB.

Cell AB59 has this formula in it =AND(OR(G59=K59:N59),OR(H59=K59:N59),1,0)

The logic is this. If G59 has a value found in one of the 4 cells K59:N59
and H59 has a value found in one of the 4 cells K59:N59 return the value of 1
in AB59. As you indicated I can conditionally format to return the 1 without
adding the ,1,0 but it seemed as it should have worked but you can see the
result.


AB

G59 H59 I59 J59 K59 L59 M59 N59 O59 P59 AB59
7 4 3 1 4 7 8 6 4 1 #VALUE!



"Ron Rosenfeld" wrote:

On Sat, 14 Oct 2006 11:41:01 -0700, Shu of AZ <Shu of
wrote:

I have four cells with numbers in each, (2)(4)(9)(1), then I have 6 adjacent
cells with numbers in each of them, (4)(3)(5)(8)(9)(2).
In a different cell, I need to represent a true statement that indicates if
the first two numbers in the cell's content, (2) or (4), are contained in any
of the 6 cell's content,(4)(3)(5)(8)(9)(2). If there is a match, in the one
cell that has to represent a hit, it will place a 1 in the cell. Then with a
conditional formula I can turn the cell red.

=if(or(a1=k1,a1=k2,a1=k3,a1=k4,a1=k5,a1=k6, ???(AND(a2=k1 and so on, , ,

How do you combine the OR and AND statement in one formula or is there
another way to do this.


Assuming the 4 numbers are in A1:A4, and the 6 numbers are in B1:B6, it sounds
as if you want to return a 1 if A1 is found in B1:B6 and also A2 is found in
B1:B6.

There are many ways of doing that.

One way is with an **array** formula:

=AND(OR(A1=B1:B6),OR(A2=B1:B6))

To enter an **array** formula, after typing in the formula, hold down
<ctrl<shift while hitting <enter. XL will place braces {...} around the
formula.

This will return either TRUE, if both match, or FALSE if only one or none
matches.

You should be able to use the formula either to conditionally format, or if you
must have a one or zero, then precede it with a double unary:

=--AND(OR(A1=B1:B6),OR(A2=B1:B6))


--ron

 
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
How to transpose formulas from column content to row content. Notrom Excel Worksheet Functions 1 October 12th 06 06:57 PM
Combining formulas jezzica85 Excel Discussion (Misc queries) 5 March 3rd 06 06:56 AM
lookup cell content in multiple files oldbuffer Excel Worksheet Functions 0 September 13th 05 06:37 PM
How to create Multiple Conditional Formulas in a single cell? Maxfx Excel Discussion (Misc queries) 2 February 1st 05 02:26 PM
Multiple formulas including INDIRECT Gizmo Excel Worksheet Functions 4 December 21st 04 07:07 PM


All times are GMT +1. The time now is 06:41 AM.

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"