If And Function?

melbwarrior

New Member
Joined
Apr 19, 2018
Messages
16
Hello all

Looking for some help on what will probably be a simple excel formula:


ABC
ab1
ab1
ab1
cs2
ds3
es2
fs2
fs2
fs2
fs2

<colgroup><col span="3"><col></colgroup><tbody>
</tbody>

If A1 is the same as A2 etc then return true, but when the cell content changes like for example when a4 goes from a to c my IF formula breaks down or doesn't return the result required

I would want this repeated for columns B and C returning the value in D.

So if the contents in A match and B match and C match = then return true.

ab1
ab1
ab1

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>

The above for example is true as it displays matching criteria in the 3 columns

cs2
ds3
es2

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>

This would be false



Hope that makes sense

Thanks in advance
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi,

If I understand correctly, the IF function is not needed:


Excel 2010
ABCD
1ab1TRUE
2ab1TRUE
3ab1FALSE
4cs2FALSE
5ds3FALSE
6es2FALSE
7fs2TRUE
8fs2TRUE
9fs2TRUE
10fs2FALSE
Sheet11
Cell Formulas
RangeFormula
D1=AND(A1=A2,B1=B2,C1=C2)


D1 formula copied down.
 
Upvote 0
Hi,

If I understand correctly, the IF function is not needed:

Excel 2010
ABCD
1ab1TRUE
2ab1TRUE
3ab1FALSE
4cs2FALSE
5ds3FALSE
6es2FALSE
7fs2TRUE
8fs2TRUE
9fs2TRUE
10fs2FALSE

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet11

Worksheet Formulas
CellFormula
D1=AND(A1=A2,B1=B2,C1=C2)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

It fails when you there is change in value - in this instance the first 3 rows should be returning true

D1 formula copied down.


it fails when there is change in value - in this instance the first 3 rows should be returning true.
 
Upvote 0
Your written description says going downwards, not both upwards And downwards, if that's what you want, I need you to insert a blank row at the beginning:


Excel 2010
ABCD
1
2ab1TRUE
3ab1TRUE
4ab1TRUE
5cs2FALSE
6ds3FALSE
7es2FALSE
8fs2TRUE
9fs2TRUE
10fs2TRUE
11fs2TRUE
Sheet11
Cell Formulas
RangeFormula
D2=OR(AND(A2=A3,B2=B3,C2=C3),AND(A2=A1,B2=B1,C2=C1))
 
Upvote 0
Your written description says going downwards, not both upwards And downwards, if that's what you want, I need you to insert a blank row at the beginning:

Excel 2010
ABCD
1
2ab1TRUE
3ab1TRUE
4ab1TRUE
5cs2FALSE
6ds3FALSE
7es2FALSE
8fs2TRUE
9fs2TRUE
10fs2TRUE
11fs2TRUE

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet11

Worksheet Formulas
CellFormula
D2=OR(AND(A2=A3,B2=B3,C2=C3),AND(A2=A1,B2=B1,C2=C1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

looks good - thank you very much
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top