ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Category (https://www.excelbanter.com/excel-worksheet-functions/156696-category.html)

Andri

Category
 
Please help.

I have a database with customer name at Column A, and the things they
purchased located from Column B, C, onward. They are 15 Fields, that customer
can buy.
Col B: Food
Col C: Drink
Col D: Food
Col E: N/A (the customer dont buy this item).
....
Col ?: Tool

how to know, that a customer buy only with one Category or more than two
category. But please be informed, if Customer A, buy Col B and Col D, i would
like still to consider that she buy one category of FOOD.

TIA.

andy62

Category
 
At the end of each row, you can insert a formula that counts the number of
items purchased, taking into account that food counts only once. This
formula would go in the first row, then you could copy it down to all the
other rows:

=COUNTA(B2:P2)-IF(AND(B2<"",D2<""),1,0)

It works by counting the items and then subtracting 1 if both FOOD
categories have an entry. The formula assumes you leave the cells blank if a
customer does not purchase any item in a category.

I would suggest you consider moving the formula to BEFORE the purchases
columns so you won't have to scroll to the right to see it each time. Just
adjust the range references.

Hope that helps.

"Andri" wrote:

Please help.

I have a database with customer name at Column A, and the things they
purchased located from Column B, C, onward. They are 15 Fields, that customer
can buy.
Col B: Food
Col C: Drink
Col D: Food
Col E: N/A (the customer dont buy this item).
...
Col ?: Tool

how to know, that a customer buy only with one Category or more than two
category. But please be informed, if Customer A, buy Col B and Col D, i would
like still to consider that she buy one category of FOOD.

TIA.



All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com