Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
in a worksheet "test" with autofilter mode, I'm using the formula: =nb_row_aera(1) which refers to my VBA function : Function nb_row_area(n as Long) As Long nb_row_area Worksheets("test").AutoFilter.Range.SpecialCells(x lCellTypeVisible).Areas(n).Rows.Count End Function the problem is that the result is always the nb of rows in the initia range for Autofilter even if filters are activated in the worksheet! On the contrary, the same code placed into a macro provides goo results!!! Sub Pr_nb_row_area() n = 1 MsgBo Worksheets("test").AutoFilter.Range.SpecialCells(x lCellTypeVisible).Areas(n).Rows.Count End Sub Why and how should I modify the function -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Incorrect result using NPER worksheet function | Excel Worksheet Functions | |||
How do I display the result of a function on seperate worksheet e. | Excel Worksheet Functions | |||
Link a cell from another worksheet as a result in a function? | Excel Worksheet Functions | |||
How can I put result of If worksheet function into a different cel | Excel Worksheet Functions | |||
Possible to know who has called a function ? | Excel Programming |