Not sure which formula to use on this.

west5405

New Member
Joined
Jul 10, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
In cell S7:S15 I would like to count every quantity of price no matter what item it is.

Please checkout sample at below
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Many forum users are not able to download files from weblinks due to security restrictions, see the link below for details of how to attach your sheet directly to your thread.
 
Upvote 0
In cell S7:S15 I would like to count every quantity of price no matter what item it is

G-testing1.xlsx
ABCDEFGHIJKLMNOPQR
1ItemLocationPrice1-1Price2-1Location2Price1-2Price2-2Location3Price1-3Price2-3SUM Qty1SUM Qty2Sum Price1Sum Price2SUM Total
2AppleSouth2East32North3486120120240Item Count0
3OrangeEast45North25West810142098016002580Total Quantity221
4AvocadoWest82North55West1814158409001740$$ $ 10,115.00
5BananaNorth75West56South561717153015303060
6MangoNorth48West17East55102040010001400PriceQuantity
7GrapeWest59South51North11111122027549515
8WatermelonEast52South25641311#N/A#N/AN/A20
9BlackBerry736936161824036060025
10   40
11   50
12   70
13 80
14 60
15 90
Main
Cell Formulas
RangeFormula
M2:M9M2=INDEX(PriceList[Price1],MATCH([@Item],PriceList[Item],0))*[@[SUM Qty1]]
N2:N9N2=INDEX(PriceList[Price2],MATCH([@Item],PriceList[Item],0))*[@[SUM Qty2]]
R2R2=COUNT(A2:A25)
R3R3=SUM(Main_090719[[SUM Qty1]:[SUM Qty2]])
R4R4=SUM(O:O)
L2:L12L2=[@[Price2-1]]+[@[Price2-2]]+[@[Price2-3]]
O2:O12O2=IFNA([@[Sum Price1]]+[@[Sum Price2]],"N/A")
K2:K15K2=[@[Price1-1]]+[@[Price1-2]]+[@[Price1-3]]
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A10:A1048576,A1:A8Cell ValueduplicatestextNO


Below is table from other sheet

G-testing1.xlsx
ABC
1ItemPrice1Price2
2Apple1520
3Grape2025
4Mango4050
5Orange7080
6Avocado6060
7Banana9090
8BlackBerry1520
9Cherries2025
10
11
PriceList
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:ACell ValueduplicatestextNO
 
Upvote 0
Change the formulas in columns M and N so that they only contain the INDEX part of the formula to give a unit price, e.g. =INDEX(PriceList[Price1],MATCH([@Item],PriceList[Item],0)) and change the column header to Unit Price1 (repeat for each price column in the price list),then add the multiplier, *[@[SUM Qty1]] in another column, e.g. [@[Unit Price1]]*[@[SUM Qty1]]

Then you could use a simple SUMIF formula in column R, e.g. =SUMIF(Main_090719[Unit Price1],[@[Price]],Main_090719[SUM Qty1])
As you have multiple columns, you will need a sumif formula for each of them, then add the results together.
 
Upvote 0
Change the formulas in columns M and N so that they only contain the INDEX part of the formula to give a unit price, e.g. =INDEX(PriceList[Price1],MATCH([@Item],PriceList[Item],0)) and change the column header to Unit Price1 (repeat for each price column in the price list),then add the multiplier, *[@[SUM Qty1]] in another column, e.g. [@[Unit Price1]]*[@[SUM Qty1]]

Then you could use a simple SUMIF formula in column R, e.g. =SUMIF(Main_090719[Unit Price1],[@[Price]],Main_090719[SUM Qty1])
As you have multiple columns, you will need a sumif formula for each of them, then add the results together.

OMG it work very well TQ so much.
If still have some question to ask.

G-testing1.xlsx
AB
1101
2102
3103
4T101
5T102
6
73
8
Sheet1

How to make it count with letter & the return =5
 
Upvote 0
=COUNTA(A1:A6) will count any cells that are not empty.

Note that this includes any blank cells that contain formulas.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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