Excel VBA Macro : Excel VBA Special Cells
This method (SpecialCells) is great help to return a reference ranges with certain characteristics.
For example we can be obtained by method SpecialCells references to ranges.
This would be the syntax to Get an Object Range of Cells.
The cell range is where you want to search the cells with certain Flat characteristics.

Range (rangeOfCells) .SpecialCells (Type, Value)

The parameters would be: Type: Mandatory parameter representing the type of cells to be included. Value: Optional parameter
If the parameter "Type" is (xlCellTypeConstants) or (xlCellTypeFormulas), the parameter "Value"
will determine what types of cells to be included in the range returned.

A) The constants for the types of cells to search (XlCellType) 

xlCellTypeAllFormatConditions. Cells with any format.xlCellTypeAllValidation.Cells with validation criteria.
xlCellTypeBlanks.Empty cells.
     xlCellTypeComments.Cells containing notes.
     xlCellTypeConstants.Cells containing constants.                                   ..

xlCellTypeFormulas.Cells containing formulas.
     xlCellTypeLastCell.The last cell in the range.

xlCellTypeSameFormatConditions.Cells that have the same format.
xlCellTypeSameValidation.Cells having the same validation criteria.xlCellTypeVisible.All the visible cells.


B) Constants for the second parameter is optional (XlSpecialCellsValue)lCellsValuValue This second parameter will allow us to refine our search by filtering

by special cells: xlErrors, xlLogical, xlNumbers, xlTextValues

Example: 
Set rng = Range (YourRange) .SpecialCells (xlCellTypeFormulas, xlErrors) ' formulas  

MsgBox rng.Addres

Sub VbaExcelCode_SampleSpeciallCells ()
'MacroVbaExcel-MyExcelTools.com

Dim YourRange as Range
YourRange = "A1: C13"
Set rng = Range (YourRange) .SpecialCells (xlCellTypeFormulas, xlNumbers) 'formulasers) 'formulas 
MsgBox rng.Address
Set rng = Range (YourRange) .SpecialCells (xlCellTypeFormulas, xlErrors)
MsgBox rng.Address 
Debug.Print rng.Address
'Note: 'Using debug print you can write the value of a variable, etc. in the window immediately 
To see the window immediately being on the vba editor you must press Control G
It is especially useful for analyzing the values ​​taken by a variable in the process vba

End Sub