![]() |
![]() |
|
|||||||
| 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: Apr 2002
Posts: 113
|
SOLVED: Tom, Thanks very much for the quick reply.
=============================== How do I write a function that will return "true" if a cell contains a formula? Given A1 = 3+4 then desire isformula(A1) = True Function IsFormula(cell As Range) As Boolean Dim Temp As String Temp = ActiveSheet.cell.Select.Formula If Left(Temp, 1) = "=" Then IsFormula = True Else IsFormula = False End If End Function But I get a type mismatch error that I have not been able to solve. Also: Can one create a function like row() that automatically evaluates the current cell? (Because I will be using this formula in conditional formating to highlight the formulas.) Thanks, Brian Thanks, Brian [ This Message was edited by: Brian on 2002-05-24 18:03 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Try this:
Avoid using objects in your code for variables. cells Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|