Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SLS SLS is offline
external usenet poster
 
Posts: 1
Default VBA Code to identify contents of a cell

Does anyone know a way to identify which cells contain values vs formulas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default VBA Code to identify contents of a cell

This will be helpful:

Tip #2: Excel Automation: More than just a formula
http://www.fmsinc.com/free/tips.html#ExcelautomationVBA

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"SLS" wrote in message
...
Does anyone know a way to identify which cells contain values vs formulas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default VBA Code to identify contents of a cell

Hi
msgbox range("A1").hasformula

--
Regards
Frank Kabel
Frankfurt, Germany

"SLS" schrieb im Newsbeitrag
...
Does anyone know a way to identify which cells contain values vs

formulas?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA Code to identify contents of a cell

Hi SLS,

'\\ Use the SpecialCells method to identify all formula cells in a given
range:
On Error Resume Next
Set rng = Range("A1:D100").SpecialCells(xlFormulas)
On Error GoTo 0

'\\ Check if an individual cell contains a formula:
If Range("A1").HasFormula = True Then
'A1 contains a formula
End If

'\\ Determine if all cells in a range are formulae:
If rng.HasFormula = True Then
'all the cells in rng1 are formulae
End If


---
Regards,
Norman



"SLS" wrote in message
...
Does anyone know a way to identify which cells contain values vs formulas?



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
Cell Contents to identify source Filename ThalesNate Excel Discussion (Misc queries) 1 June 7th 06 07:28 PM
In Excel, how do I identify the contents of a cell as numerical o. jessica Excel Discussion (Misc queries) 2 March 25th 05 07:23 PM
Run code based on cell contents Pete JM[_9_] Excel Programming 2 June 22nd 04 07:09 PM
How to validate in code the contents of a cell? Heather M. Excel Programming 1 November 11th 03 08:14 AM
run code after cell contents change Brian Excel Programming 0 September 5th 03 08:37 PM


All times are GMT +1. The time now is 03:28 AM.

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"