Any way to filter cells with formulas ?

G

gaftalik

Hi,
I need to filter cells with formulas and not to select them , is that
possible by a simple or advanced filter ?
Thank you .
 
G

gaftalik

In a range of cells which contains constant values and formulas , i nee
to add a filter or a macro to filter all cells that contain onl
formulas in a way to hide the rows in which there is a constant valu
cell ! is that possible ?

Thank you much
 
D

Dave Peterson

You could use a UserDefined Function that returns true/false depending on if
there's a formula in that cell:

Option Explicit
Function HasFormula(rng as range) as boolean
set rng = rng.cells(1) 'only one cell
HasFormula=rng.hasformula
end function

Then you could add a column of helper cells that contain formulas:

=hasformula(a1)
(and drag down)
and filter on that.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top