![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Is there in Excel any function to check if a cell contains a formula, like for example =ISNUMBER(A1) or ISTEXT(A1)?
Eli [ This Message was edited by: eliW on 2002-04-08 14:35 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Aladin |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Thank you Aladin,
It would be very useful though. |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
Could not get the Excel TYPE(Value) function to test True for 8 (the formula), but here is an UDF that works. ----------------------- Function IsFormula(RefCell As Range) If RefCell.Cells.Count <> 1 Then IsFormula = CVErr(xlErrValue) Else IsFormula = RefCell.HasFormula End If End Function ----------------------- Returns True or False. Called as =ISFORMULA(A1) Should work with other functions. HTH, Jay |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
1. Enter =A2+2 into cell A1. 2. With cell B1 selected setup a defined name, Has_Formula, that refers to... =GET.CELL(48,A1) Now, you can enter the formula, =Has_Formula, in any cell to see if the cell to its left contains a formula. =Has_Formula will return TRUE or FALSE. [ This Message was edited by: Mark W. on 2002-04-08 16:19 ] |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|