Urgent Excel Formula Help Needed!

harvw

New Member
Joined
Apr 16, 2017
Messages
19
Hi Guys,


I am trying to develop a formula which can help me do the following:


1. Looks up for two specific values in two separate columns
2. Looks for the first value in a third column and also looks for the second value in a fourth value
3. If both the first value and second value are found in the same row in the third and fourth columns, then the formula should return TRUE, if not, then it should return FALSE


I've tried to illustrate the example below.



COLUMN 1 COLUMN 2 COLUMN 3 COLUMN 4


10002334 50 10002334 55
10003445 60 10002334 75
10002456 70 10002566 40
10004567 55 10002344 50 (SHOULD MATCH)
10004513 66 10004513 78
10008907 41 10004513 66 (SHOULD MATCH)


Thanks for your help in advance.


I look forward to all of your responses.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi Guys,


I am trying to develop a formula which can help me do the following:


1. Looks up for two specific values in two separate columns
2. Looks for the first value in a third column and also looks for the second value in a fourth value
3. If both the first value and second value are found in the same row in the third and fourth columns, then the formula should return TRUE, if not, then it should return FALSE


I've tried to illustrate the example below.



COLUMN 1 COLUMN 2 COLUMN 3 COLUMN 4


10002334 50 10002334 55
10003445 60 10002334 75
10002456 70 10002566 40
10004567 55 10002344 50 (SHOULD MATCH)
10004513 66 10004513 78
10008907 41 10004513 66 (SHOULD MATCH)


Thanks for your help in advance.


I look forward to all of your responses.

Sorry I should have made it clear that the first task of the formula is to look for the first and second values in the same row in COLUMN 1 and COLUMN 2.
It is then looking for these same values in the same row in COLUMNS 3 and 4.
 
Upvote 0
Try this:

=AND(SUMPRODUCT(--($A$2:$A$100&$B$2:$B$100=C2&D2)))

Thanks. The formula works like a treat!

Out of interest, if I wanted to do this for multiple columns, i.e. look for eight different values in the same row (C1, C2, C3, C4, C5, C6, C7 C8) and then find exactly the same values in eight different columns (C9, C10, C11, C12, C13, C14, C15, C16) what would the structure of this formula look like?
 
Upvote 0
Maybe this:

=AND(SUMPRODUCT(--($A$2:$A$100&"-"&$B$2:$B$100&"-"&$C$2:$C$100&"-"&$D$2:$D$100&"-"&$E$2:$E$100&"-"&$F$2:$F$100&"-"&$G$2:$G$100&"-"&$H$2:$H$100=I2&"-"&J2&"-"&K2&"-"&L2&"-"&M2&"-"&N2&"-"&O2&"-"&P2)))

I have added dashes to handle situations like |123|456|... vs |1234|56|...
 
Upvote 0
Maybe this:

=AND(SUMPRODUCT(--($A$2:$A$100&"-"&$B$2:$B$100&"-"&$C$2:$C$100&"-"&$D$2:$D$100&"-"&$E$2:$E$100&"-"&$F$2:$F$100&"-"&$G$2:$G$100&"-"&$H$2:$H$100=I2&"-"&J2&"-"&K2&"-"&L2&"-"&M2&"-"&N2&"-"&O2&"-"&P2)))

I have added dashes to handle situations like |123|456|... vs |1234|56|...

Thanks again man!

Works brilliantly!
 
Upvote 0
... Let's say COLUMN 1 and COLUMN 2 are in one sheet and COLUMN 3 and COLUMN 4 are in another sheet. How would this formula work then?
Like this:

=AND(SUMPRODUCT(--(Sheet1!$A$2:$A$100&"-"&Sheet1!$B$2:$B$100=Sheet2!C2&"-"&Sheet2!D2)))
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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