Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Populated Cells In A Named Range

I am an Access Programmer using automation to Excel

In a Named Range of 12 cells, is there a function to tel
how many of those cells have entries greater than Zero

I could code that w/ many IF statements, but would lik
to know if a function exists

TIA - Bob
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Populated Cells In A Named Range

In a worksheet that would be accomplished with a formula like this:

=COUNTIF(RangeName,"0")

So presumably

xlApp.CountIf(XL.Range("RangeName"), "0")

would return the count via automation.
--
Jim Rech
Excel MVP
"Bob Barnes" wrote in message
...
|I am an Access Programmer using automation to Excel.
|
| In a Named Range of 12 cells, is there a function to tell
| how many of those cells have entries greater than Zero?
|
| I could code that w/ many IF statements, but would like
| to know if a function exists.
|
| TIA - Bob


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Populated Cells In A Named Range

"Bob Barnes" wrote in message
...
|I am an Access Programmer using automation to Excel.
|
| In a Named Range of 12 cells, is there a function to tell
| how many of those cells have entries greater than Zero?
|


As a MS Access developer you will be please to learn that you don't
need automation to access read cell values, you can access the names
range as if it were a Jet table. This is how the query would look like
from a MS Access query's SQL window:

SELECT
Count(MyKeyColumn)
FROM
[Excel 8.0;database=C:\MyWorkbook.xls;].[MyNamedRange]
GROUP BY
MyKeyColumn
HAVING
INT(MyKeyColumn) 0
;

--
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Populated Cells In A Named Range

You can invoke the CountIF function like this:
=COUNTIF(RangeName,"0")
"Bob Barnes" wrote in message
...
I am an Access Programmer using automation to Excel.

In a Named Range of 12 cells, is there a function to tell
how many of those cells have entries greater than Zero?

I could code that w/ many IF statements, but would like
to know if a function exists.

TIA - Bob



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
find last populated cell in range of cells Maximus[_2_] Excel Worksheet Functions 6 July 22nd 09 04:31 PM
Copy cells from named range Melissa Excel Discussion (Misc queries) 2 January 19th 07 08:27 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
looping cells though a named range Jo[_4_] Excel Programming 1 August 20th 03 12:32 AM


All times are GMT +1. The time now is 05:14 AM.

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"