다음을 통해 공유


Range.AdvancedFilter Method (Excel)

Filters or copies data from a list based on a criteria range. If the initial selection is a single cell, that cell's current region is used.

Syntax

.AdvancedFilter(Action, CriteriaRange, CopyToRange, Unique)

A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

Action

필수

XlFilterAction

One of the constants of XlFilterAction specifying whether to make a copy or filter the list in place.

CriteriaRange

선택

Variant

The criteria range. If this argument is omitted, there are no criteria.

CopyToRange

선택

Variant

The destination range for the copied rows if Action is xlFilterCopy. Otherwise, this argument is ignored.

Unique

선택

Variant

True to filter unique records only. False to filter all records that meet the criteria. The default value is False.

Return Value

Variant

Example

This example filters a database (named "Database") based on a criteria range named "Criteria."

Range("Database").AdvancedFilter _ 
 Action:=xlFilterInPlace, _ 
 CriteriaRange:=Range("Criteria")

참고 항목

개념

Range Object

Range Object Members