Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not a VBA expert, and this is a very simple function...
I'm trying to create a function that will count the number of rows in a named range. The function will be used in a formula in the workbook. This is what I have: ------------------------------- Function RowsInNamedRange(NamedRange As Range) As Integer RowsInNamedRange = Range(NamedRange).Rows.Count End Function ------------------------------- When I test via immediate window using: ? RowsInNamedRange "rngNamedRange1" Where "rngNamedRange1" is a named range. I get a type mismatch error. I know this is a simple fix...but just haven't figured it out yet. Any pointers?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count(if(... using array formula: can I use a named range in my ca | Excel Worksheet Functions | |||
How to count number of pages in a named range | Excel Programming | |||
How do I count a named range for a specific word or acronym? | Excel Worksheet Functions | |||
Count formula within a named range. | Excel Discussion (Misc queries) | |||
Dynamic Named Range count | Excel Programming |