Formula with multiple conditions

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello guys,
I am trying to enter an if formula to get the result. But as there are multiple conditions I am not able to write the formula. I require your expertise to get the correct formula. The expected result is manually entered in column E. The 3 conditions to be included in the formula as shown in the image.
Query to match Portal+Tally.xlsx
ABCDEFGHI
1abcdefgh
21445PORTAL03AAFCC9473R1ZZMatched1924.36=IF(B2<>B3,C2=C3,H2=H3,"Matched","")
31877TALLY03AAFCC9473R1ZZMatched1924.36
4571PORTAL03AAFCC9473R1ZZMatched8555.43
51860TALLY03AAFCC9473R1ZZMatched8555.43
61446PORTAL03AAFCC9473R1ZZ9313.92
72118TALLY06AAACL2096A1ZZ4602.00
8397PORTAL06AAACL2096A1ZZ4602.00
9272PORTAL06AACCE2411Q1ZO246400.00
101604PORTAL06AAFCC9473R1ZT6879.82
111605PORTAL06AAFCC9473R1ZT10200.96
12379PORTAL06AAFCC9473R1ZT11011.10
13771PORTAL06AALFP8162H1ZXMatched4720.00
142496TALLY06AALFP8162H1ZXMatched4720.00
15769PORTAL06AALFP8162H1ZXMatched18762.00
162495TALLY06AALFP8162H1ZXMatched18762.00
171557PORTAL06AALFP8162H1ZXMatched19706.00
182498TALLY06AALFP8162H1ZXMatched19706.00
191558PORTAL06AALFP8162H1ZX23600.00
201559PORTAL06AALFP8162H1ZX38940.00
21770PORTAL06AALFP8162H1ZXMatched39613.00
222497TALLY06AALFP8162H1ZXMatched39613.00
23636PORTAL27AACFE3300R1ZEMatched46800.00
24638PORTAL27AACFE3300R1ZEMatched46800.00
251934TALLY27AACFE3300R1ZEMatched46800.00
261936TALLY27AACFE3300R1ZEMatched46800.00
271159PORTAL27AACFE3300R1ZE53200.00
281551PORTAL29AAACB9461B1ZS138516.00
29222PORTAL29AAACB9461B1ZSMatched142800.00
301761TALLY29AAACB9461B1ZSMatched142800.00
312063TALLY29AAACI5569D1ZGMatched7943.76
321236PORTAL29AAACI5569D1ZGMatched7943.76
Match Portal & Tally
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
your request is not clear. Do all three conditions need to be met or is it an "or" equation. If all 3 need to be met why would E3 = matched when H3 doesnt equal H$. Please provide clearly what you require the equation to do
 
Upvote 0
your request is not clear. Do all three conditions need to be met or is it an "or" equation. If all 3 need to be met why would E3 = matched when H3 doesnt equal H$. Please provide clearly what you require the equation to do
All the 3 conditions must match. I am matching Portal with Tally. So if the 2 other conditions are met then the first condition one should be Portal and the other should be Tally
 
Upvote 0
Excel Formula:
=IF(and(B2<>B3,C2=C3,H2=H3),"Matched","")
 
Upvote 0
I am not getting the matches in both the rows. Please try and edit this formula which was shared for some other match. I am not able to edit it. The range is different in this formula
Rich (BB code):
=IFERROR(IF(B2="PORTAL",F2,INDEX(F$2:F$20000,AGGREGATE(15,6,(ROW(F$2:F$20000)-ROW(F$2)+1)/((B$2:B$20000="PORTAL")*(C$2:C$20000=C2)*(H$2:H$20000>=H2-1)*(H$2:H$20000<=H2+1)),MAX(1,COUNTIFS(B$2:B2,"TALLY",C$2:C2,C2,H$2:H2,">="&H2-1,H$2:H2,"<="&H2+1))))),F2)
 
Upvote 0
which question do you want answering. The formula above doesn't resemble your initial request which I have provided an answer to
 
Upvote 0
which question do you want answering. The formula above doesn't resemble your initial request which I have provided an answer to
I want the answer to my first query only. The formula I shared is just to make you understand better. It was a solution from a different query
 
Upvote 0
I want the answer to my first query only. The formula I shared is just to make you understand better. It was a solution from a different query
the answer to your first is at post #4. that will place "matched" into column E if the criteria you asked for is met
 
Upvote 0
No. See my expected result and your result of the formula.
Query to match Portal+Tally.xlsx
ABCDEFGHI
1abcdGordsky's formulafghExpected Result in column E
21445PORTAL03AAFCC9473R1ZZMatched1924.36Matched
31877TALLY03AAFCC9473R1ZZ 1924.36Matched
4571PORTAL03AAFCC9473R1ZZMatched8555.43Matched
51860TALLY03AAFCC9473R1ZZ 8555.43Matched
61446PORTAL03AAFCC9473R1ZZ 9313.92
72118TALLY06AAACL2096A1ZZMatched4602.00
8397PORTAL06AAACL2096A1ZZ 4602.00
9272PORTAL06AACCE2411Q1ZO 246400.00
101604PORTAL06AAFCC9473R1ZT 6879.82
111605PORTAL06AAFCC9473R1ZT 10200.96
12379PORTAL06AAFCC9473R1ZT 11011.10
13771PORTAL06AALFP8162H1ZXMatched4720.00Matched
142496TALLY06AALFP8162H1ZX 4720.00Matched
15769PORTAL06AALFP8162H1ZXMatched18762.00Matched
162495TALLY06AALFP8162H1ZX 18762.00Matched
171557PORTAL06AALFP8162H1ZXMatched19706.00Matched
182498TALLY06AALFP8162H1ZX 19706.00Matched
191558PORTAL06AALFP8162H1ZX 23600.00
201559PORTAL06AALFP8162H1ZX 38940.00
21770PORTAL06AALFP8162H1ZXMatched39613.00Matched
222497TALLY06AALFP8162H1ZX 39613.00Matched
23636PORTAL27AACFE3300R1ZE 46800.00Matched
24638PORTAL27AACFE3300R1ZEMatched46800.00Matched
251934TALLY27AACFE3300R1ZE 46800.00Matched
261936TALLY27AACFE3300R1ZE 46800.00Matched
271159PORTAL27AACFE3300R1ZE 53200.00
281551PORTAL29AAACB9461B1ZS 138516.00
29222PORTAL29AAACB9461B1ZSMatched142800.00Matched
301761TALLY29AAACB9461B1ZS 142800.00Matched
312063TALLY29AAACI5569D1ZGMatched7943.76Matched
321236PORTAL29AAACI5569D1ZG 7943.76Matched
Match Portal & Tally
Cell Formulas
RangeFormula
E2:E32E2=IF(AND(B2<>B3,C2=C3,H2=H3),"Matched","")
 
Upvote 0
After matching if I sort the data to check the blank for mismatches, the rows which are matched with "Matched" will also be shown in the blank rows.
 
Upvote 0

Forum statistics

Threads
1,215,038
Messages
6,122,798
Members
449,095
Latest member
m_smith_solihull

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