Multiple if condition

RAJESH1960

Active Member
Joined
Mar 26, 2020
Messages
453
Office Version
  1. 2019
Platform
  1. Windows
Hello
I am trying to work out a formula to match the date and amount. If e2=e3 and if f2=f3 then display true, else false.

query match date and amount.xlsx
DEF
1DateAmount
2FALSE01-05-202010800.00
3FALSE01-05-202067517.00
4TRUE29-09-202087091.00
5TRUE29-09-202087091.00
6FALSE24-07-20206272.00
7TRUE31-10-2020428.81
8TRUE31-05-2020428.81
9FALSE31-01-2021857.62
10FALSE30-09-20201286.43
11TRUE29-06-2020114534.00
12TRUE29-06-2020114534.00
13TRUE27-07-2020275940.00
14TRUE27-07-2020275940.00
15TRUE12-12-202013650.00
16TRUE12-12-202013650.00
17FALSE05-01-202132193.00
18FALSE04-07-202032340.00
19FALSE05-07-202032340.00
20FALSE18-08-20202604.00
21FALSE13-03-20202633.00
Reconcile
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E27:F1048576,E1:F19Expression=COUNTIFS($B$1:$B$1428,$B1,$F$1:$F$1428,"<"&$F1+0.5,$F$1:$F$1428,">"&$F1-0.5)=1textNO
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,689
Office Version
  1. 365
Platform
  1. Windows
Place this in cell E2 and copy down for all rows:
Excel Formula:
=OR(AND(E2=E3,F2=F3),AND(E2=E1,F2=F1))
 
Solution

RAJESH1960

Active Member
Joined
Mar 26, 2020
Messages
453
Office Version
  1. 2019
Platform
  1. Windows
Place this in cell E2 and copy down for all rows:
Excel Formula:
=OR(AND(E2=E3,F2=F3),AND(E2=E1,F2=F1))
Thanks Joe. You just saved a lot of my time.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,689
Office Version
  1. 365
Platform
  1. Windows
You are welcome.

They key is that you need to check not only the row below the current row, but also the row above the current row for each entry.
Since OR and AND are boolean functions, you do not need an IF, since boolean functions return TRUE/FALSE, by definition.
 

RAJESH1960

Active Member
Joined
Mar 26, 2020
Messages
453
Office Version
  1. 2019
Platform
  1. Windows
You are welcome.

They key is that you need to check not only the row below the current row, but also the row above the current row for each entry.
Since OR and AND are boolean functions, you do not need an IF, since boolean functions return TRUE/FALSE, by definition.
Thanks. Noted.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,808
Messages
5,627,010
Members
416,214
Latest member
boston814

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
Top