Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With the following in a standard module:
Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works fine for me Jim.
Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A1:A3 contains 123, 234, 345 respectfully
A4 displays 702 ( = Sum(A1:A3)) B4 = = Isformula(A4) -- Displaying #Name? Did I indicate #VALUE? before.. CRAP yes I should have indicated #Name? this is what's being displayed.. Sorry, "Bob Phillips" wrote in message ... Works fine for me Jim. Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As Jim said, put it in a general module, not the sheet module.
-- Regards, Tom Ogilvy "Jim May" wrote in message news:Nkj0f.79$jw6.35@lakeread02... A1:A3 contains 123, 234, 345 respectfully A4 displays 702 ( = Sum(A1:A3)) B4 = = Isformula(A4) -- Displaying #Name? Did I indicate #VALUE? before.. CRAP yes I should have indicated #Name? this is what's being displayed.. Sorry, "Bob Phillips" wrote in message ... Works fine for me Jim. Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, everything before now was based on my having the Isformula() in my
Personal.xls file. << where it wasn't working!! I just copied the complete function into a std module of the subject workbook, And it Worked !! What's the difference? Does this prompt a reaction? TIA,,, Jim "Jim May" wrote in message news:Nkj0f.79$jw6.35@lakeread02... A1:A3 contains 123, 234, 345 respectfully A4 displays 702 ( = Sum(A1:A3)) B4 = = Isformula(A4) -- Displaying #Name? Did I indicate #VALUE? before.. CRAP yes I should have indicated #Name? this is what's being displayed.. Sorry, "Bob Phillips" wrote in message ... Works fine for me Jim. Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=personal.xls!isformula(a4)
Jim May wrote: OK, everything before now was based on my having the Isformula() in my Personal.xls file. << where it wasn't working!! I just copied the complete function into a std module of the subject workbook, And it Worked !! What's the difference? Does this prompt a reaction? TIA,,, Jim "Jim May" wrote in message news:Nkj0f.79$jw6.35@lakeread02... A1:A3 contains 123, 234, 345 respectfully A4 displays 702 ( = Sum(A1:A3)) B4 = = Isformula(A4) -- Displaying #Name? Did I indicate #VALUE? before.. CRAP yes I should have indicated #Name? this is what's being displayed.. Sorry, "Bob Phillips" wrote in message ... Works fine for me Jim. Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HooRay!!!
Is this always the rule (prefacing with =personal.xls!)? Tks Dave, Jim "Dave Peterson" wrote in message ... =personal.xls!isformula(a4) Jim May wrote: OK, everything before now was based on my having the Isformula() in my Personal.xls file. << where it wasn't working!! I just copied the complete function into a std module of the subject workbook, And it Worked !! What's the difference? Does this prompt a reaction? TIA,,, Jim "Jim May" wrote in message news:Nkj0f.79$jw6.35@lakeread02... A1:A3 contains 123, 234, 345 respectfully A4 displays 702 ( = Sum(A1:A3)) B4 = = Isformula(A4) -- Displaying #Name? Did I indicate #VALUE? before.. CRAP yes I should have indicated #Name? this is what's being displayed.. Sorry, "Bob Phillips" wrote in message ... Works fine for me Jim. Does the range A1:A3 have anything odd i it? Does A4 sum to the correct value? "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It works fine for me. Just to confirm the code is in a regular module "Module
1" (or the like) and not in the sheet or in "ThisWorkbook". -- HTH... Jim Thomlinson "Jim May" wrote: With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this works for me
Private Function IsFormula(cell As Range) As Integer If cell.HasFormula Then IsFormula = 1 Else IsFormula = 0 End If End Function -- Gary "Jim May" wrote in message news:LYi0f.67$jw6.44@lakeread02... With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try:
Function IsFormula(cell As Range) As Boolean If Cell.HasFormula Then IsFormula = True Else Is Formula = False End If End Function |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Were you playing with named ranges beforehand? Did you create one named
IsFormula? Any chance your module name is IsFormula (as well as the function name)? Jim May wrote: With the following in a standard module: Function IsFormula(cell As Range) As Boolean IsFormula = cell.HasFormula End Function In cell A4 of sheet1 there is a formula = Sum(A1:A3) In cell B4 I have =IsFormula(A4) -- Displaying #Value? I've search google, etc.. CRAP!! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert text entered as minutes/seconds to minutes | Excel Worksheet Functions | |||
Converting total minutes into hours and minutes in Excel | Excel Worksheet Functions | |||
converting Days Hours & minutes into just minutes in excel | Excel Discussion (Misc queries) | |||
how to change a decimal number (minutes) into hours and minutes? | Excel Discussion (Misc queries) | |||
add column of minutes, show total in hours & minutes | Excel Worksheet Functions |