ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If And Or functions (https://www.excelbanter.com/excel-worksheet-functions/13456-if-functions.html)

Soz

If And Or functions
 
Hello,
Looking for help in using above functions in one formula if possible.

A B C
1 1234 195 formula (with "yes" return)
2 1234 190 "yes" return also needed
because it corresponds with equal number above it
3 2222 195 "yes" return also needed
4 2222 195 "yes" return also needed
5 2222 190 "yes" return also needed

I'm looking to get a "yes" return in column (C) if the number in column A
(A1) matches the one after it (A2) but only if the first number (A1) has 195
in column B (B1) and 190 or 195 in column B (B2) for the equal number in
(A2). I also need a "yes" return for the second number for filtering
purposes. I have a long list of numbers and I've Sorted it first by column A
then by B in descending order. I'm looking to autofilter list (column c) by
"yes" but need to view all equal numbers (A1 & A2).

I hope I explained this correctly. Any help is greatly appreciated.
Soz



JulieD

Hi Soz

try -

for C1
=IF(AND(A1=A2,B1=195,OR(B2=190,B2=195)),"yes","no" )

for D1 and fill down rest of list
=IF(AND(A2=A3,B2=195,OR(B3=190,B3=195)),"yes",IF(A ND(A2=A1,B1=195,OR(B2=195,B2=190)),"yes","no"))

Cheers
JulieD

"Soz" wrote in message
...
Hello,
Looking for help in using above functions in one formula if possible.

A B C
1 1234 195 formula (with "yes"
return)
2 1234 190 "yes" return also needed
because it corresponds with equal number above it
3 2222 195 "yes" return also needed
4 2222 195 "yes" return also needed
5 2222 190 "yes" return also needed

I'm looking to get a "yes" return in column (C) if the number in column A
(A1) matches the one after it (A2) but only if the first number (A1) has
195 in column B (B1) and 190 or 195 in column B (B2) for the equal number
in (A2). I also need a "yes" return for the second number for filtering
purposes. I have a long list of numbers and I've Sorted it first by column
A then by B in descending order. I'm looking to autofilter list (column c)
by "yes" but need to view all equal numbers (A1 & A2).

I hope I explained this correctly. Any help is greatly appreciated.
Soz




Coltsfan


If I understand correctly, you could do a vlookup formula to search your
number in column B and then return true if the same number is in the
column. If I misunderstood let me know because I do the same thing
your doing all the time.


--
Coltsfan
------------------------------------------------------------------------
Coltsfan's Profile: http://www.excelforum.com/member.php...o&userid=19982
View this thread: http://www.excelforum.com/showthread...hreadid=345938



All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com