#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Is it a formula

Quick question.

Is there a VBA command that tests the activecell to see if it contains a
formula as opposed to actual text or number?
I've found tests for errors, dates, numbers, text etc.
You can test for "=" as it tests the value of the cell.

Prob really simple but I'm baffled.

Cheers
Giz
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Is it a formula

On Thu, 23 Nov 2006 06:45:02 -0800, Gizmo63
wrote:

Quick question.

Is there a VBA command that tests the activecell to see if it contains a
formula as opposed to actual text or number?
I've found tests for errors, dates, numbers, text etc.
You can test for "=" as it tests the value of the cell.

Prob really simple but I'm baffled.

Cheers
Giz



Function HasFormula(cell)
HasFormula = cell.HasFormula
End Function



--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Is it a formula

Cheers Ron,
Sorted.
I was expecting an 'IS' test (ISDATE, ISERROR etc) not a 'HAS' test.



"Ron Rosenfeld" wrote:

On Thu, 23 Nov 2006 06:45:02 -0800, Gizmo63
wrote:

Quick question.

Is there a VBA command that tests the activecell to see if it contains a
formula as opposed to actual text or number?
I've found tests for errors, dates, numbers, text etc.
You can test for "=" as it tests the value of the cell.

Prob really simple but I'm baffled.

Cheers
Giz



Function HasFormula(cell)
HasFormula = cell.HasFormula
End Function



--ron

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Is it a formula

On Fri, 24 Nov 2006 04:43:02 -0800, Gizmo63
wrote:

Cheers Ron,
Sorted.
I was expecting an 'IS' test (ISDATE, ISERROR etc) not a 'HAS' test.




Glad to help.
--ron
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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 04:35 PM.

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

About Us

"It's about Microsoft Excel"