Satisfy multiple criteria

alanlambden

Board Regular
Joined
Nov 20, 2014
Messages
73
Hi,

I have two sets of data, each set has several columns of data. I want to be able to flag any rows that have two numbers that are identical? Here is an example:

https://imge.to/i/vgKLRV

I hope that link work let me know if it doesn't.

I want to flag the right column (M) only if the numbers in column B matches exactly with the number in column K AND the number in column C matches column L. If either dont match, then leave blank.

PS, is there an easy way to see if the numbers differ by less than 5? This could go in the column N
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
How's this?


Excel 2010
ABCDEFGHIJKLMN
1HoleNorthEastRLRC holeUTM NUTM EDesired ResultDiffer by 5
2New_19091250725308P_19091250725308New_1 
3New_29091250725358P_29091250725358New_2
4New_39091250725408P_39091250725408New_3
5New_49091250725558P_49091250725558New_4
6New_59091250725608P_59091250725607New_5
7New_69091300725285P_79091300725353
8New_79091300725353P_89091300725383
9New_89091300725450P_99091300725433
10New_99091350725508P_109091350725258New_9
11New_109091350725558P_119091350725508
Sheet18
Cell Formulas
RangeFormula
M2=IF(AND(B2=K2,C2=L2),A2,"")
N2=IF(M2<>"","",IF(ABS(C2-L2)<5,A2,""))
 
Upvote 0
Do you see in my image how new_9 is matching identically (B and C = K and L) with P_11, they are on different rows. You code works only if the values match on the same row.

Im sure we have to use an array or a vlookup but i can quite get it working.
 
Upvote 0
It's not making sense to me, unfortunately. B11 matches K10 and K11. The first match is K10. So, since C11 exists somewhere in L (It's in L5), the answer is the first match of B11?
 
Upvote 0
I think that made the difference for me. See if this is correct:


Excel 2010
ABCDEFGHIJKLM
1HoleNorthEastRLRC holeUTM NUTM EDesired Result
2New_19091250725308P_19091250725308New_1
3New_29091250725358P_29091250725358New_2
4New_39091250725408P_39091250725408New_3
5New_49091250725558P_49091250725558New_4
6New_59091250725608P_59091250725607
7New_69091300725285P_79091300725353New_7
8New_79091300725353P_89091300725383
9New_89091300725450P_99091300725433
10New_99091350725508P_109091350725258
11New_109091350725558P_119091350725508New_9
Sheet18
Cell Formulas
RangeFormula
M2{=IFERROR(INDEX($A$2:$A$11,MATCH(K2&L2,$B$2:$B$11&$C$2:$C$11,0),1),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
That worked kweaver!

Is there a way to adjust it so the numbers aren't an exact match but the numbers differ by 5?
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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