I have a workbook with 2 sheets, in sheet 2 are a list of product codes with corresponding price in 2 currencies. In sheet 1 a drop-down list of the product codes and a drop-down list of the 2 currencies.
As it is now, in sheet 1, I select the product code from a list and with the below formula I am only able to pull the “USD List” price regardless if I select “USD List” or “CAD List” because I don’t know how to write the formula to identify where to draw the data from.
=IF(ISNA(VLOOKUP(A2,'Sheet 2'!$B$2:$C$4,2,FALSE)),"",VLOOKUP(A2,'Sheet 2'!$B$2:$C$4,2,FALSE))
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<thead>[TR="class: tableizer-firstrow"]
[TH][/TH]
[TH]SHEET 1[/TH]
[TH] [/TH]
[TH] [/TH]
[/TR]
</thead><tbody> [TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product Code[/TD]
[TD]Currency[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]VB-444x612-2[/TD]
[TD]CAD List[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]MM-898x728-3[/TD]
[TD]USD List[/TD]
[TD]$15.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<thead>[TR="class: tableizer-firstrow"]
[TH][/TH]
[TH]SHEET 2[/TH]
[TH] [/TH]
[TH] [/TH]
[/TR]
</thead><tbody> [TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product Code[/TD]
[TD]USD List[/TD]
[TD]CAD List[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]VB-444x612-2[/TD]
[TD]$10.00[/TD]
[TD]$11.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]MM-898x728-3[/TD]
[TD]$15.00[/TD]
[TD]$16.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]MS-999x2142-1S[/TD]
[TD]$12.00[/TD]
[TD]$13.00[/TD]
[/TR]
</tbody>[/TABLE]
As it is now, in sheet 1, I select the product code from a list and with the below formula I am only able to pull the “USD List” price regardless if I select “USD List” or “CAD List” because I don’t know how to write the formula to identify where to draw the data from.
=IF(ISNA(VLOOKUP(A2,'Sheet 2'!$B$2:$C$4,2,FALSE)),"",VLOOKUP(A2,'Sheet 2'!$B$2:$C$4,2,FALSE))
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<thead>[TR="class: tableizer-firstrow"]
[TH][/TH]
[TH]SHEET 1[/TH]
[TH] [/TH]
[TH] [/TH]
[/TR]
</thead><tbody> [TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product Code[/TD]
[TD]Currency[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]VB-444x612-2[/TD]
[TD]CAD List[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]MM-898x728-3[/TD]
[TD]USD List[/TD]
[TD]$15.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<thead>[TR="class: tableizer-firstrow"]
[TH][/TH]
[TH]SHEET 2[/TH]
[TH] [/TH]
[TH] [/TH]
[/TR]
</thead><tbody> [TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product Code[/TD]
[TD]USD List[/TD]
[TD]CAD List[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]VB-444x612-2[/TD]
[TD]$10.00[/TD]
[TD]$11.00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]MM-898x728-3[/TD]
[TD]$15.00[/TD]
[TD]$16.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]MS-999x2142-1S[/TD]
[TD]$12.00[/TD]
[TD]$13.00[/TD]
[/TR]
</tbody>[/TABLE]