I would like to be able to test if a cell has a formula - or not. Prefer to return a logical. Thanks
L lessburgfred Nov 13, 2009 #1 I would like to be able to test if a cell has a formula - or not. Prefer to return a logical. Thanks
M Mike H Nov 13, 2009 #2 Hi, Open VB editor, insert a module into 'ThisWorkbook' and paste the code below in. Call from a worksheet cell with =IsFormula(A1) Function IsFormula(rng As Range) As Boolean If rng.HasFormula Then IsFormula = True End If End Function
Hi, Open VB editor, insert a module into 'ThisWorkbook' and paste the code below in. Call from a worksheet cell with =IsFormula(A1) Function IsFormula(rng As Range) As Boolean If rng.HasFormula Then IsFormula = True End If End Function
T Teethless mama Nov 13, 2009 #3 create a define name call HasFormula Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE)) Assuming your data in Column A In column B type: HasFormula If the cell has A formula it returns TRUE, else FALSE
create a define name call HasFormula Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE)) Assuming your data in Column A In column B type: HasFormula If the cell has A formula it returns TRUE, else FALSE
T T. Valko Nov 13, 2009 #4 See this: http://groups.google.com/group/micr...c/browse_thread/thread/6bf323d2cf859ecd?tvc=2
R ryguy7272 Nov 13, 2009 #5 To take TM's idea one step further.. http://spreadsheetpage.com/index.php/tip/identify_formulas_by_using_conditional_formatting/ HTH, Ryan-- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. Teethless mama said: create a define name call HasFormula Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE)) Assuming your data in Column A In column B type: HasFormula If the cell has A formula it returns TRUE, else FALSE lessburgfred said: I would like to be able to test if a cell has a formula - or not. Prefer to return a logical. Thanks Click to expand... Click to expand...
To take TM's idea one step further.. http://spreadsheetpage.com/index.php/tip/identify_formulas_by_using_conditional_formatting/ HTH, Ryan-- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. Teethless mama said: create a define name call HasFormula Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE)) Assuming your data in Column A In column B type: HasFormula If the cell has A formula it returns TRUE, else FALSE lessburgfred said: I would like to be able to test if a cell has a formula - or not. Prefer to return a logical. Thanks Click to expand... Click to expand...