If / and lookup

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
Attempting to lookup by product from a data table arranged like:

[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]3100[/TD]
[TD]3200[/TD]
[TD]3300[/TD]
[/TR]
[TR]
[TD]Cust A[/TD]
[TD]25[/TD]
[TD]125.26[/TD]
[TD]10.26[/TD]
[TD]1000.00[/TD]
[/TR]
[TR]
[TD]Cust B[/TD]
[TD]80[/TD]
[TD]589.67[/TD]
[TD]13.59[/TD]
[TD]3000.00[/TD]
[/TR]
[TR]
[TD]Cust C[/TD]
[TD]90[/TD]
[TD]625.71[/TD]
[TD]19.99[/TD]
[TD]5600.00[/TD]
[/TR]
[TR]
[TD]Cust D[/TD]
[TD]100[/TD]
[TD]228.14[/TD]
[TD]8.56[/TD]
[TD]9000.00[/TD]
[/TR]
</tbody>[/TABLE]

I need to be able to lookup the value of sales for product codes (col C-E) if the customer code in col B is xx:

[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Prod Code[/TD]
[TD]C Code[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]3100[/TD]
[TD]100[/TD]
[TD]228.14[/TD]
[/TR]
[TR]
[TD]3300[/TD]
[TD]80[/TD]
[TD]3000.00[/TD]
[/TR]
</tbody>[/TABLE]

Any advise appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
ok, assuming the values to lookup are in A9 (3100) and in B9(100) and the table you posted to find the value is in A1:E5.
Code:
=INDEX($B$1:$E$5,MATCH(B9,$B$1:$B$5,0),MATCH(A9,$B$1:$E$1,0))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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