XL.Sheet.AutoFilter.GetTop10
----------------------------

Gets the number of top or bottom items.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [7.3](newinversion73.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Sheet.AutoFilter.GetTop10"; BookRef; SheetIndex; FilterColumnIndex; Selector ) 

**MBS**( **"XL.Sheet.AutoFilter.GetTop10";** /\* Gets the number of top or bottom items. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$FilterColumnIndex**; /\* The column index of the filter.  
Range from 0 to [XL.Sheet.AutoFilter](XLSheetAutoFilter.md).ColumnSize-1.e.g. $FilterColumn \*/   
**$Selector**) /\* Which value to return.  
Can be value for number of items;   
top to get top items if 1 otherwise bottom items if 0; percent for using percent instead of number items.e.g. "Value" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| SheetIndex | The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |
| FilterColumnIndex | The column index of the filter.   Range from 0 to [XL.Sheet.AutoFilter](XLSheetAutoFilter.md).ColumnSize-1. | $FilterColumn |
| Selector | Which value to return.   Can be value for number of items;    top to get top items if 1 otherwise bottom items if 0; percent for using percent instead of number items. | "Value" |

### Result

Returns value or error.

### Description

Gets the number of top or bottom items.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.AutoFilter](XLSheetAutoFilter.md)
- [XL.Sheet.AutoFilter.ColumnSize](XLSheetAutoFilterColumnSize.md)
- [XL.Sheet.AutoFilter.FilterType](XLSheetAutoFilterFilterType.md)
- [XL.Sheet.AutoFilter.GetRef](XLSheetAutoFilterGetRef.md)
- [XL.Sheet.AutoFilter.GetSort](XLSheetAutoFilterGetSort.md)
- [XL.Sheet.AutoFilter.GetSortEx](XLSheetAutoFilterGetSortEx.md)
- [XL.Sheet.AutoFilter.GetSortRange](XLSheetAutoFilterGetSortRange.md)
- [XL.Sheet.AutoFilter.SetRef](XLSheetAutoFilterSetRef.md)
- [XL.Sheet.AutoFilter.SetTop10](XLSheetAutoFilterSetTop10.md)

This function checks for a license.

Created 1st July 2017 , last changed 1st July 2017

  
[XL.Sheet.AutoFilter.GetSortRange](XLSheetAutoFilterGetSortRange.md) - [XL.Sheet.AutoFilter.SetCustomFilter](XLSheetAutoFilterSetCustomFilter.md)

[HTML Version](XLSheetAutoFilterGetTop10.shtml)