Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 20 minutes trying...

=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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 20 minutes trying...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 20 minutes trying...

try:
Function IsFormula(cell As Range) As Boolean
If Cell.HasFormula Then
IsFormula = True
Else
Is Formula = False
End If
End Function



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 20 minutes trying...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert text entered as minutes/seconds to minutes Kathie Excel Worksheet Functions 1 May 6th 10 05:05 AM
Converting total minutes into hours and minutes in Excel colette Excel Worksheet Functions 11 December 26th 07 07:24 PM
converting Days Hours & minutes into just minutes in excel Six Sigma Blackbelt Excel Discussion (Misc queries) 5 April 28th 06 09:45 PM
how to change a decimal number (minutes) into hours and minutes? Erwin Excel Discussion (Misc queries) 2 November 5th 05 04:22 PM
add column of minutes, show total in hours & minutes glider pilot Excel Worksheet Functions 1 December 30th 04 10:27 PM


All times are GMT +1. The time now is 11:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"