#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HasFormula

Can someone say what kinds of formulas are detected as being present in a
cell by the HasFormula property?

Some different kinds of formulas:

=A30

=A30/K$29

=A20*A21

=atan(A20)

Also, can someone say what this statement will return and define as the
rngDst.

With ActiveCell
...
Set rngDst = Range(.Formula)
...
EndWith

depending upon which of the above formulas is in the ActiveCell?

Thank you.

John Wirt


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default HasFormula

Select all your cells and do Edit=Goto=Special and select Formlas.

All you show would qualify as a formula.

from the immediate window:

? activeCell.HasFormula
True
? activeCell.Formula
=10
ActiveCell.Value = 10
? activeCell.HasFormula
False
?ActiveCell.Formula
10


Your second question is that none of the formula strings are valid range
references except =A30, so they would all return error except =A30.

From the immediate window:

?Range("=A30").Address
$A$30

--
Regards,
Tom Ogilvy

"John Wirt" wrote in message
...
Can someone say what kinds of formulas are detected as being present in a
cell by the HasFormula property?

Some different kinds of formulas:

=A30

=A30/K$29

=A20*A21

=atan(A20)

Also, can someone say what this statement will return and define as the
rngDst.

With ActiveCell
...
Set rngDst = Range(.Formula)
...
EndWith

depending upon which of the above formulas is in the ActiveCell?

Thank you.

John Wirt




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
HasFormula protect cell SIGE Excel Programming 7 May 19th 05 05:24 PM


All times are GMT +1. The time now is 06:25 PM.

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"