Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does anyone know how to differentiate the cell formed by a value or a formula?
such as in cell a1 = 7 [value only] and in cell b1 = 3 + 4 [any formula] If the cell contains value, then return 0, else If the cell contains formula, then reurn 1. In this case, a2 = 0 [return], because a1 contains value and b2 = 1 [return], because b1 contains formula Does anyone have any suggestion? Thank you in advance Eric |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
See your other post.
"Eric" wrote: Does anyone know how to differentiate the cell formed by a value or a formula? such as in cell a1 = 7 [value only] and in cell b1 = 3 + 4 [any formula] If the cell contains value, then return 0, else If the cell contains formula, then reurn 1. In this case, a2 = 0 [return], because a1 contains value and b2 = 1 [return], because b1 contains formula Does anyone have any suggestion? Thank you in advance Eric |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How about a tiny UDF:
Function got_formula(r As Range) As Integer If r.HasFormula Then got_formula = 1 Else got_formula = 0 End If End Function if you are not familiar with VBA, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student gsnu200701 "Eric" wrote: Does anyone know how to differentiate the cell formed by a value or a formula? such as in cell a1 = 7 [value only] and in cell b1 = 3 + 4 [any formula] If the cell contains value, then return 0, else If the cell contains formula, then reurn 1. In this case, a2 = 0 [return], because a1 contains value and b2 = 1 [return], because b1 contains formula Does anyone have any suggestion? Thank you in advance Eric |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank everyone for suggestion
I still don't understand how to create a User Defined Functions after reading the link, it shows only the macro, but it does not talk much about User Defined Functions. Could you please give me more suggestion? Thank for your help Eric "Gary''s Student" wrote: How about a tiny UDF: Function got_formula(r As Range) As Integer If r.HasFormula Then got_formula = 1 Else got_formula = 0 End If End Function if you are not familiar with VBA, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student gsnu200701 "Eric" wrote: Does anyone know how to differentiate the cell formed by a value or a formula? such as in cell a1 = 7 [value only] and in cell b1 = 3 + 4 [any formula] If the cell contains value, then return 0, else If the cell contains formula, then reurn 1. In this case, a2 = 0 [return], because a1 contains value and b2 = 1 [return], because b1 contains formula Does anyone have any suggestion? Thank you in advance Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reusing formula | Excel Discussion (Misc queries) | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
Match then lookup | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions |