Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Vlookup function for multiple conditions

Status
Not open for further replies.

blyssz

Technical User
Nov 18, 2008
49
US
I have data in the following format in an excelspreadsheet in a workbook.

Workbook1: Data

Origin Type Sub-Type Score1 Score2 Score3 Total
South Africa Apple Red Delicious 5 10 3 18
South Africa Apple Grany Smith 1.3 2.2 3.0 6.5
South Africa Apple Sweet Apple 2 1 4 7
South Africa Oranges Very tart 3 5 8 16
South Africa Oranges Little Sweet 2 4 3 9
France Apple Red Delicious 4 6 3 13
France Apple Grany Smith 2.9 3.1 4.2 10.2
France Apple Sweet Apple 2 4 3 9
France Oranges Very tart 2 6 1 9
France Oranges Little Sweet 4 2 7 13

I need to create the output in the following format in another sheet in other workbook.I created a frame for the output in the spreadsheet and tried using Vlookup or index function for multiple conditions but the problem is that sub-type is not same in the data sheet and output sheet.
How can I get output in the following format using excel formula or functions?

Workbook2: Required Output
South Africa Val1 Val2 Val3 Total
Apple R.D 5 10 3 18
G.S 1.3 2.2 3.0 6.5
S.A 2 1 4 7
Oranges V.T 3 5 8 16
L.S 2 4 3 9

France Val1 Val2 Val3 Total
Apple R.D 4 6 3 13
G.S 2.9 3.1 4.2 10.2
S.A 2 4 3 9
Oranges V.T 2 6 1 9
L.S 4 2 7 13
 


Hi,

Check out the Pivot Table Wizard. Seems like that would do exactly what you need.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top