Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default counting a range that has only general format

I'm attempting to count cells in a range that have a general format. Need
help with countif.
--
1 putt
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default counting a range that has only general format

Hi,

AFAIK that can't be done with countif. How about a UDF.

Alt +F11 to open VB editor. Right click 'ThisWorkbook' and insert module and
paste the code beolw in

call with

=CountGeneral(A!:A10)


Function CountGeneral(rng As Range) As Long
For Each c In rng
If c.NumberFormat = "General" Then
CountGeneral = CountGeneral + 1
End If
Next
End Function
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"E" wrote:

I'm attempting to count cells in a range that have a general format. Need
help with countif.
--
1 putt

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
Excel is defaulting to Number format instead of General format Kim Excel Discussion (Misc queries) 1 March 11th 10 01:25 PM
Change General format to Date format Vic Excel Discussion (Misc queries) 2 May 2nd 09 09:41 AM
General Format to Custom format problem KELC-F/A Excel Discussion (Misc queries) 1 May 2nd 08 09:51 PM
Format: General - Text - General iturnrocks Excel Worksheet Functions 3 August 11th 06 04:47 PM
excel numbers in general format i cant add cant change format claude Excel Worksheet Functions 2 July 7th 06 08:18 PM


All times are GMT +1. The time now is 06:19 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"