Match two columns across sheets and based on criteria of another column

tarakul

New Member
Joined
Sep 19, 2007
Messages
16
Hi All

This is driving me nuts. What I have is:

Sheet1:
ColumnB - number stored as text (Work ID)
Remaining Columns: - mixed data, some columsn numbers, some text

Sheet 2

ColumnA - number stored as text (Work ID)
ColumnB:ColumnAW - mixed data, some columsn numbers, some text
CollumnAX - Dollar Values

What I want is in Column F (Sheet1) a formula to:

if workID in Sheet1!ColumnB is present in Sheet2!ColumnA AND Sheet2!ColumnAX>1 then return True

This must be possible - Please Help

Thanks
 

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).
try this

Code:
=IF(ISNUMBER(MATCH(B2,Sheet2!A:A,0)),VLOOKUP(B2,Sheet2!A:AX,50,0)>1)
 
Upvote 0
Hi All

This is driving me nuts. What I have is:

Sheet1:
ColumnB - number stored as text (Work ID)
Remaining Columns: - mixed data, some columsn numbers, some text

Sheet 2

ColumnA - number stored as text (Work ID)
ColumnB:ColumnAW - mixed data, some columsn numbers, some text
CollumnAX - Dollar Values

What I want is in Column F (Sheet1) a formula to:

if workID in Sheet1!ColumnB is present in Sheet2!ColumnA AND Sheet2!ColumnAX>1 then return True

This must be possible - Please Help

Thanks

Sheet1

A2:

Control+shift+enter, not just enter...
Code:
=ISNUMBER(MATCH(1, 
    IF(Sheet2!$A$2:$A$400=B2, 
    IF(ISNUMBER(Sheet2!$AX2:$AX$400), 
    IF(Sheet2!$AX2:$AX$400 > 1, 1))),0))

Note. If AX is numeric, Sankar's suggestion would more appropriate.
 
Last edited:
Upvote 0
First formula :) - Brilliant! That worked. Could you do me two huge favours??? (Thanks for your response Aladin too but the first formula worked!)

1. explain what the first formula is doing :)
2. is it possible to amend the formula so as well as looking to see if AX>1 it checks AB<>"Text1" AND AC<>"Text2"

Thanks!
 
Upvote 0
the first part
Code:
ISNUMBER(MATCH(B2,Sheet2!A:A,0)
checks, availablity of the number in column A,

if available, the next part
Code:
VLOOKUP(B2,Sheet2!A:AX,50,0)

takes the 50th column (AX) in the corresponding row and checks, if >1

both the steps are true, the output is a TRUE, if any of the 2 steps fails, result is FALSE

here is a suggestion for the next question

Code:
=SUMPRODUCT(--(Sheet2!A1:A100=B2),--(Sheet2!AX1:AX100>1),--(Sheet2!AB1:AB100="Text1"),--(Sheet2!AC1:AC100="Text2"))>0

note: you can't use whole column reference in SUMPRODUCT (as against VLOOKUP / MATCH)
 
Upvote 0
Wow thanks!

Now I want to use the true or false in combination with a sumproduct formula in another sheet to sum using multiple criteria, one of which will be when this column equals true, but it doesnt seem to pick it up:

=SUMPRODUCT(--('Forecast Data Dump'!$T$2:$T$2001="TRUE"),.........

Doesnt seem to work...is it because the FALSE and TRUE in the column are not strings?
 
Last edited:
Upvote 0
First formula :) - Brilliant! That worked. Could you do me two huge favours??? (Thanks for your response Aladin too but the first formula worked!)

1. explain what the first formula is doing :)
2. is it possible to amend the formula so as well as looking to see if AX>1 it checks AB<>"Text1" AND AC<>"Text2"

Thanks!

Regarding (2), things are now different...

Control+shift+enter, not just enter...
Code:
=ISNUMBER(MATCH(1, 
    IF(Sheet2!$A$2:$A$400=B2,
    IF(($AB$2:$AB$400<>"Text1")*($AC$2:$AC$400<>"Text2"),
    IF(ISNUMBER(Sheet2!$AX2:$AX$400)*
      (Sheet2!$AX2:$AX$400 > 1), 1))),0))
 
Upvote 0
Wow thanks!

Now I want to use the true or false in combination with a sumproduct formula in another sheet to sum using multiple criteria, one of which will be when this column equals true, but it doesnt seem to pick it up:

=SUMPRODUCT(--('Forecast Data Dump'!$T$2:$T$2001="TRUE"),.........

Doesnt seem to work...is it because the FALSE and TRUE in the column are not strings?


TRUE/FALSE are booleans, not strings, hence doesn't require the ",

BTW, you dont have to include them in the formula explicitly,

something like below would do the job

Code:
=SUMPRODUCT(--('Forecast Data Dump'!$T$2:$T$2001),.........
 
Upvote 0
thank you so much - i should have come to the forum before i wasted a whole day trying to work this out :(

Thanks!!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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