Solved

Microsoft Excel formula with multiple criterias based on 2 sheets

Posted on 2016-11-09
4
76 Views
Last Modified: 2016-11-10
Hi,

I would like to create a formula that will look at multiple criteria.

I will try to explain clearly.

I have a sheet 1 that i would like to validate the Rank based on a match in the name and city column and also if the value from table 1or table 2 or table 3 from Sheet1 are greater then the value in table 1or table 2 or table 3 from Sheet2. If one of the table values are greater than the sheet 2, it will result to Rank 2 value, else it will take the Rank 1 value from Sheet 2.

Ex on sheet 1:
Sheet1
Ex on Sheet 2:
Sheet2
Since on Sheet 1, Name Robert and City Guelf exist in Sheet 2,
then it will verify if Table 1 from sheet 1 => than Table 1 from sheet 2
or
Table 2 from sheet 1 = > than Table 2 from sheet 2
or
Table 3 from sheet 1 => than Table 3 from sheet 2.

If one of the tables are greater that the ones from Sheet2, then it will pull the value from Rank 2. It the result is <, than it will give the value from Rank 1.

If there is a not match on the name and city, it will say "No_Match" for the rank.

An example of the result based on the 2 first images above would be:
Sheet 1 result
How can i do that?

Here is a sample
Sheet1-versus-Sheet-2.xlsx
0
Comment
Question by:Wilder1626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Michael earned 500 total points
ID: 41881968
Try the following array formula:

=IFERROR(IF(OR(C2>=VLOOKUP(A2&B2,CHOOSE({1,2},Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,Sheet2!$C$2:$C$100),2,0),D2>=VLOOKUP(A2&B2,CHOOSE({1,2},Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,Sheet2!$D$2:$D$100),2,0),E2>=VLOOKUP(A2&B2,CHOOSE({1,2},Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,Sheet2!$E$2:$E$100),2,0)),VLOOKUP(A2&B2,CHOOSE({1,2},Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,Sheet2!$G$2:$G$100),2,0),VLOOKUP(A2&B2,CHOOSE({1,2},Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100,Sheet2!$F$2:$F$100),2,0)),"No_Match")


and enter the formula with ctrl+shift+enter


Edit: Here's an explanation on the topic and multiple ways to tackle the issue.
Sheet1-versus-Sheet-2.xlsx
0
 
LVL 11

Author Closing Comment

by:Wilder1626
ID: 41882099
Thanks a lot, This is what i was looking for.
0
 
LVL 22

Expert Comment

by:Shums
ID: 41882122
Add one more column after column B in both the sheet, name the column header as "Combination" and enter below formula in both the sheets

=A2&"_"&B2

Then in Sheet1 in Column G, where you want to get desired result, enter below formula
=IF(OR($F2>IFERROR(VLOOKUP($C2,Sheet2!$C:$H,4,0),""),$E2>IFERROR(VLOOKUP($C2,Sheet2!$C:$H,3,0),""),$D2>IFERROR(VLOOKUP($C2,Sheet2!$C:$H,2,0),"")),IFERROR(VLOOKUP($C2,Sheet2!$C:$H,6,0),""),IFERROR(VLOOKUP($C2,Sheet2!$C:$H,5,0),""))

Drag the formula in Sheet1 from Column G2 till your last row.
0
 
LVL 11

Author Comment

by:Wilder1626
ID: 41883141
Thanks Shums Millwala for your option. That also is a good idea.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question