• Home
  • Blog
  • Resume
  • Contact
  • Projects
  • Gallery
  • Amit’s Resume
  • About Nagpur
KEEP IN TOUCH

Count cells without formulae

Aug07
2006
Leave a Comment Written by admin

If you want to count cells in a given range without formulae use this function

Function CountNoFormula(rng As Range) As Long
Dim c As Range
   On Error GoTo CountNoFormula_Error
    For Each c In rng
        If Not c.HasFormula Then
            CountNoFormula = CountNoFormula + 1
        End If
    Next c
CountNoFormula_CleanUpExit:
   Exit Function
CountNoFormula_Error:
    CountNoFormula = CVErr(Err.Number)
    Resume CountNoFormula_CleanUpExit
End Function

If you want to count cells with formule then just remove then “Not” in front of c.HasFormula

Related posts:

  1. Stack Columns of Data on one column
  2. Microsoft Office Assistance: Summing up ways to add and count Excel data
  3. Count number of asterisk (*)
  4. Save HTML files from one folder to Excel files in another folder
  5. Description of the limitations for working with arrays in Excel 2000, Excel 2002, and Excel 2003
Posted in Uncategorized - Tagged cells, count
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« Average of n samllest or n biggest numbers from a list
» Assign macro to a button

No Comments Yet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Tags

Access Alt F8 Books boxplot cells charts count cursor dashboard data mining dbase design error excel excel functions export filter flip LaTex MS query Number Err ODBC pipes Press Alt F11 Public Sub python R random numbers Range Cells report scripting software sparklines SQL SQL server stack columns statistics stemming string tag cloud text mining UDF VBA visualization wildcard

Network

View Ashutosh Nandeshwar's profile on LinkedIn

Recent Comments

  • larry on Access Export to Excel (2007)
  • Betty Chou on Projects
  • Rwill on Access Export to Excel (2007)
  • Bharathi on The search key was not found in any record in Access
  • Michael on The search key was not found in any record in Access

Related Posts

  1. Stack Columns of Data on one column
  2. Microsoft Office Assistance: Summing up ways to add and count Excel data
  3. Count number of asterisk (*)
  4. Save HTML files from one folder to Excel files in another folder
  5. Description of the limitations for working with arrays in Excel 2000, Excel 2002, and Excel 2003

EvoLve theme by Blogatize  •  Powered by WordPress nandeshwar.info