LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
TechMGR
 
Posts: n/a
Default Did I stump everyone? Counter that ignores hidden rows

As I never got any response to my previous question "How to create a counter
that ignores hidden rows?", I'm assuming that either I stumped everyone or I
did a lousy job of posing the question. Let me try again...

I am trying to create a simple counter that does not index if the row that
it is on is hidden. I have tried using the SUBTOTAL function as follows...

I set Cells B4477=1 and B4478=2

The formula for Cell B4479 is then written as...

=SUBTOTAL(103,$B$4477:B4478)+1

The formula for Cell B4480 is then ...

=SUBTOTAL(103,$B$4477:B4479)+1 and so on for the consequent cells down
the column.

It works for the 1st occurence (i.e. Cell B4479=3) but the rest of the cells
down the column are also equal to three, as if the subtotal function is not
recognizing the VALUE results of previous functions? I have tried both the
"COUNTA" version and the "COUNT" version with no success. :(

I also tried the following macro but for the life of me I can't figure out
why it doesn't work either...

Sub AUTOFILL_NOTE_NUMBERS()
'
Dim RowNum, ColNum
RowNum = 4477 ' Initialize variables.
ColNum = "B"
Do While RowNum < 4600
RowNum = RowNum + 1 ' Increment Counter.
If Rows("RowNum:RowNum").EntireRow.Hidden = False Then
Range("ColNum & RowNum") = Range("ColNum & RowNum") + 1
Else
Range("ColNum & RowNum") = 0
End If
Loop
End Sub

Thanks!
 
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
Creating a counter that does not include hidden rows TechMGR Excel Discussion (Misc queries) 1 April 4th 05 10:11 PM
Row counter in formula jjpcpanama Excel Worksheet Functions 5 March 23rd 05 06:20 AM
Increment a counter in Excel COSdl Excel Worksheet Functions 2 March 4th 05 09:47 PM
purchase order counter in excel purchase order template Brandy@baoco Excel Worksheet Functions 0 February 23rd 05 06:17 PM
How do i get an average that ignores blanks in the range of cells. ucastores Excel Worksheet Functions 7 November 11th 04 05:01 PM


All times are GMT +1. The time now is 05:28 PM.

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"