Is there a way to use =VLOOKUP to average this way?

JLAKS11

New Member
Joined
Apr 12, 2015
Messages
7
Excel 2012
ABCDEFGHIJKL
1MY ID#DISTRIBUTER #1 SKUDISTRIBUTER #1 STOCKDISTRIBUTER #1 PRICEDISTRIBUTER #2 SKUDISTRIBUTER #2 STOCKDISTRIBUTER #2 PRICEDISTRIBUTER #3 SKUDISTRIBUTER #3 STOCKDISTRIBUTER #3 PRICEAVAILABILITYAVERAGED PRICE
2159596920instock10.9942890instock8.99instock9.99
3162717061outofstock15.99880-HS3513outofstock18.99outofstockn/a
4164717073instock4.99880-HS4513instock7.99instock6.49
5166880-HS513instock11.99instock11.99
6168596922instock6.9940963instock4.99instock5.99
7170596924outofstock21.9940965outofstock19.99outofstockn/a
8172880-HS1459instock8.9940964outofstock6.99instock8.99
9174597712outofstock6.99253-AHSR8instock9.9940966outofstock5.99instock9.99
10176597697instock12.99253-AHSR4outofstock15.9937605instock11.99instock12.49
11178597724outofstock253-AHSR75instock4.9940443outofstock3.99instock4.99
12180253-AHSR1instock7.99instock7.99
13182597715instock17.99253-AHSR9instock20.9942865instock18.99instock19.32
14184596908instock8.9942866instock9.99instock9.49
15186596910instock5.99instock5.99
16188596904instock28.99instock28.99
17190589259outofstock23.99outofstockn/a
18192596906instock14.9937598outofstock13.99instock14.49
19194723694outofstock2.9945266outofstock3.99outofstockn/a

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1
Hi Everyone,

Been using Excel a bit now with =VLOOKUP and tables. My dilemma is trying to automate sample above sheet for a very large spreedsheet (thousands of rows). Unfortunately being to much of a newbee, only know basics of =VLOOKUP, so a more complex formula if possible to do what I need is beyond my capabilities.

First =VLOOKUP: As in above sample for AVAILABILITY. It will search DISTRIBUTOR 1,2 & 3's stock column and if it finds it instock in any of the columns it will display that in AVAILABILITY column and vice versus for if no column has instock (display outofstock).

Second =VLOOKUP: This one would be a bit more complex and have to do with generating an averaged price of all DISTRIBUTER price columns (in AVERAGED PRICE column) that show instock and dis-regard any prices of distributors that show outofstock.

Any help on this will be much appreciated.:confused:
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

Can i safely assume that there will only be a maximum of 3 distributors for each ID#?

Regards,
Wynn
 
Upvote 0
Hi Wynn,

Thank you for replying.

For purposes of displaying a simpler sheet I used 3. It would actually be a total of 5. Would more than 3 be a deal breaker for Excel =VLOOKUP?
 
Upvote 0
For K2:
{=IF(OR(C2="instock",F2="instock",I2="Instock"),"INSTOCK","Out Of Stock")}
For L2:
=AVERAGEIF((C2:F2:I2),"Instock",(D2:G2:J2))

The {...} expression is an array formula. You do not enter the "{" "}" characters but after typing he expression enter it by CTRL+SHIFT+ENTER.
 
Upvote 0
Hi Spiller,

Thank you for replying.

This is exactly what I needed and it worked perfectly. It works better than what I was trying to accomplish with =VLOOKUP because it will save me more time by not having to create additional sheets and tables.

My hat's of to you Spiller and the Mr. Excel forum. I use other forums for various different projects. By far, I have had the most pleasurable and informative experience here than out of all combined. Members here are the most informed, curtious and responsive I have found. These boards are truly something special.

Spiller and Mr. Excel you ROCK!!!!!!
 
Upvote 0

Forum statistics

Threads
1,215,368
Messages
6,124,523
Members
449,169
Latest member
mm424

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