Extracting the collection of unique values from a filter in VBA

前端 未结 5 495
长发绾君心
长发绾君心 2020-12-11 06:51

I have a file which has rows extending to tens of thousands across 8 columns. One particular column contains the weekend date. I have to count the number of weekends present

5条回答
  •  一个人的身影
    2020-12-11 07:13

    Select the range of cells, or make sure the active cell is in a table.

    On the Data tab, in the Sort & Filter group, click Advanced.

    The Sort & Filter group on the Data tab

    In the Advanced Filter dialog box, do one of the following:

    To filter the range of cells or table in place, click Filter the list, in-place.

    To copy the results of the filter to another location, do the following:

    Click Copy to another location.

    In the Copy to box, enter a cell reference.

    Alternatively, click Collapse Dialog Button image to temporarily hide the dialog box, select a cell on the worksheet, and then press Expand Dialog Button image.

    Select the Unique records only check box, and click OK.

    The unique values from the selected range are copied to the new location.

提交回复
热议问题