Populate list of categories

RIZVI

Active Member
Joined
Jan 1, 2011
Messages
295
Office Version
  1. 2010
Platform
  1. Windows
I am running a small restaurant and have various categories of items. Under each category I have wide variety of items. For example, Pizza is one category, burger is another and so on and so forth. Under Pizza there will be various varities of items, like Pizza - x, Pizza - y and so on and so forth. In the day sales list, when an item is punched it comes with the category, space, hyphen, space and the name of the item. Like Pizza - Cheeze Double Crust Pizza 8"

I want to populate the list of only category from this sales list.

Currently I m using this formula: {=IFERROR(INDEX(DaySales,SMALL(IF(FREQUENCY(IF(DaySales<>"",IF(DailySalesQty<>0,MATCH(DaySales&"|"&DaySales,DaySales&"|"&DaySales,0))),IVecDailySales),IVecDailySales),ROWS(AN$3:AN3))),"")}

To get them sorted in alphabetic manner I then use this formula: {=INDEX($AN$3:$AN$348, MATCH(LARGE(COUNTIF($AN$3:$AN$348, ">="&$AN$3:$AN$348), ROWS(AO$3:$AO3)), COUNTIF($AN$3:$AN$348, ">="&$AN$3:$AN$348), 0))}

Is there a way to get only category by turncating from hyphen onwards. That is get only Pizza, Burger etc but not what is after that.


Looking forward for solution.

RGDS,

Rizvi.M.H.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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