Multiple if condition

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
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
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Place this in cell E2 and copy down for all rows:
Excel Formula:
=OR(AND(E2=E3,F2=F3),AND(E2=E1,F2=F1))
 
Upvote 0
Solution
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,654
Messages
6,120,758
Members
448,991
Latest member
Hanakoro

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