Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Deb
 
Posts: n/a
Default Compare 4 columns?

Hi guys,

I'm hoping someone can help me out ! I have 2 worksheets and what i need to
do is compare 2 cols from one to 2 cols in another - if they match then bring
across a value from an X col.
It's basically what a Vlookup does but instead of comparing one col and
brining acorss a value i want to make sure that two cols match before it
brings across a value.

So in lay terms :

If Value in cell Sheet1!A1 = a value in Sheet2!$A$500
AND Then
value in Sheet1!$B$1 = The value in cell D from the same row in which you
found the first matching value
THEN
bring across the value in cell F from that same row

Thanks guys and gals!!
Deb
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Compare 4 columns?

Perhaps something along these lines ..

In Sheet3,

Put in the formula bar for say, B1:
=INDEX(Sheet1!$F$1:$F$1000,MATCH(1,(Sheet2!$A$1:$A $1000=Sheet1!A1)*(Sheet2!$D$1:$D$1000=Sheet1!B1),0 ))

then array-enter the formula by pressing CTRL+SHIFT+ENTER
(instead of just pressing ENTER)

As-is, the array formula can then be copied down col B
to return correspondingly for other pairs of look-up values
in Sheet1's A2:B2, A3:B3, etc

Adapt the ranges (eg: Sheet2!$A$1:$A$1000) to suit.
Ranges must be identical in size,
and we can't use entire col references (eg: A:A, B:B, etc)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Deb" wrote:
Hi guys,

I'm hoping someone can help me out ! I have 2 worksheets and what i need to
do is compare 2 cols from one to 2 cols in another - if they match then bring
across a value from an X col.
It's basically what a Vlookup does but instead of comparing one col and
brining acorss a value i want to make sure that two cols match before it
brings across a value.

So in lay terms :

If Value in cell Sheet1!A1 = a value in Sheet2!$A$500
AND Then
value in Sheet1!$B$1 = The value in cell D from the same row in which you
found the first matching value
THEN
bring across the value in cell F from that same row

Thanks guys and gals!!
Deb

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Formula or tool to compare two columns of data RBS Excel Worksheet Functions 3 April 14th 06 06:54 PM
Compare multiple column of data and list out common and unique component in adj columns kuansheng Excel Worksheet Functions 15 February 1st 06 10:49 PM
compare 2 columns BettysAnswer Excel Worksheet Functions 1 January 27th 06 09:46 PM
Compare 2 columns, and create a list of items that are in both lists ruby2sdy Excel Worksheet Functions 3 October 8th 05 11:04 AM
Compare data in two columns to find duplicates. Dan Excel Discussion (Misc queries) 2 October 5th 05 04:42 AM


All times are GMT +1. The time now is 08:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"