Count if help required for multiple values

Krishnab4u

New Member
Joined
Jul 16, 2018
Messages
34
Dear All,

say i have a model master like below
Model CodeModel Name
1234mustang
4321fortuner

<tbody>
</tbody>

i have a table like below, where i have to capture the quantity of stock of each model name from Database
Model NameStock Quantity
Mustang=Countif(??) (status as Stock only)
Fortuner=Countif(??) (status as Stock only)

<tbody>
</tbody>

however, my database will have only Model Code like below
model codecolorstatus
1234whiteStock
1234blueInvoiced
4321redStock

<tbody>
</tbody>

One simpler way is i can do vlookup with my Model Master to add Model Name as last column in Database.
I dont want to do that for some reason.
Kindly help.


****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
Model Name
1234mustang
4321fortuner

<tbody>
</tbody>
</body>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Advise: Instead of putting up suggestions like
=Countif(??) (status as Stock only), try to post the desired values for the data sample.
 
Upvote 0
Hi,
noted.
The desired value is as follows.
Model NameStock Quantity
Mustang= 1
Fortuner= 1

<tbody>
</tbody>
 
Upvote 0

Book1
ABCDEFG
1Model CodeModel Namemodel codecolorstatusModel NameStock Quantity
21234mustang1234whiteStockMustang1
34321fortuner1234blueInvoicedFortuner1
44321redStock
5
Sheet1


G2, copied down:

=COUNTIFS($E$2:$E$4,"stock",$C$2:$C$4,VLOOKUP(F2,CHOOSE({1,2},$B$2:$B$3,$A$2:$A$3),2,0))
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,984
Members
449,276
Latest member
surendra75

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