Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

I have made several assumptions here, but try this formula:

=IF(ROW()=2,1,A1+1)

Is that what you need?

Thx
MSweetG222



"StargateFan" wrote:

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

Oops -
That formula assumes you place it in A2.
For B2 change to: =IF(ROW()=2,1,B1+1)
(I have assumed you have header row in A1 and you don't want row 1 to be #'d
& you want row 2 to be numbered 1.)

--
Thx
MSweetG222



"MSweetG222" wrote:

I have made several assumptions here, but try this formula:

=IF(ROW()=2,1,A1+1)

Is that what you need?

Thx
MSweetG222



"StargateFan" wrote:

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

On Wed, 22 Feb 2006 19:27:26 -0800, "MSweetG222"
wrote:

Oops -
That formula assumes you place it in A2.
For B2 change to: =IF(ROW()=2,1,B1+1)
(I have assumed you have header row in A1 and you don't want row 1 to be #'d
& you want row 2 to be numbered 1.)

--
Thx
MSweetG222


Hi, thanks!

I used this code and then tried hiding some rows but the row numbers
jump same as with the all the other codes and don't compensate for the
hidden rows. What am I doing wrong, pls?

I have XL2K on a new Windows 2000 installation and it's the first time
I've had W2K at home. Am finding that it's doing weird things to my
standard files that Win98SE never did, so wondering if there's a
problem with the Windows version number if this code works for you.

Pls advise and thanks. :oD

"MSweetG222" wrote:

I have made several assumptions here, but try this formula:

=IF(ROW()=2,1,A1+1)

Is that what you need?

Thx
MSweetG222



"StargateFan" wrote:

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

Hello StargateFan,

Maybe I am not understanding your issue. This is a function formula (not
code).
You cut and pasted this formula into cell B2 and copied it down to all of
the cells in question? If yes, then you will have to post a small
sample/layout of your worksheet. Thx.

Thx
MSweetG222



"StargateFan" wrote:

On Wed, 22 Feb 2006 19:27:26 -0800, "MSweetG222"
wrote:

Oops -
That formula assumes you place it in A2.
For B2 change to: =IF(ROW()=2,1,B1+1)
(I have assumed you have header row in A1 and you don't want row 1 to be #'d
& you want row 2 to be numbered 1.)

--
Thx
MSweetG222


Hi, thanks!

I used this code and then tried hiding some rows but the row numbers
jump same as with the all the other codes and don't compensate for the
hidden rows. What am I doing wrong, pls?

I have XL2K on a new Windows 2000 installation and it's the first time
I've had W2K at home. Am finding that it's doing weird things to my
standard files that Win98SE never did, so wondering if there's a
problem with the Windows version number if this code works for you.

Pls advise and thanks. :oD

"MSweetG222" wrote:

I have made several assumptions here, but try this formula:

=IF(ROW()=2,1,A1+1)

Is that what you need?

Thx
MSweetG222



"StargateFan" wrote:

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default =ROW-1, =SUBTOTAL(3,$B$2:$B2) don't work in hidden rows.

On Thu, 23 Feb 2006 09:24:26 -0800, "MSweetG222"
wrote:

Hello StargateFan,

Maybe I am not understanding your issue. This is a function formula (not
code).


Yes, as per normal.

You cut and pasted this formula into cell B2 and copied it down to all of
the cells in question? If yes, then you will have to post a small
sample/layout of your worksheet. Thx.


Yes, did so, just as I might have done with example code I gave of
what didn't work <g. I put in A2 in this case as that is column in
question and I do have a header row, as you correctly assumed <vbg:

Here is the small sample of date/layout copied directly from the
sheet:

# Date Year
01 2005.07.15.Fri 1
02 2005.07.22.Fri 1
03 2005.07.29.Fri 1
04 2005.08.05.Fri 1
05 2005.08.12.Fri 1
06 2005.08.19.Fri 1
07 2005.08.26.Fri 2
08 2005.09.09.Fri 2
09 2005.09.16.Fri 2
10 2005.09.16.Fri 2

In the column marked "#", I have in A2 the following formula, as per
what you kindly provided: =IF(ROW()=2,1,A1+1).

Here's the problem, when I manually hide rows 4 to 6, for example,
this is what happens to the numbering which defeats the purpose of
having it:

01 2005.07.15.Fri
02 2005.07.22.Fri
03 2005.07.29.Fri
07 2005.08.26.Fri
08 2005.09.09.Fri
09 2005.09.16.Fri
10 2005.09.16.Fri

Thank you! Appreciate any help in fixing this and hope there is a
solution. Up till now have only filtered rows and formulas have
worked for that, but not for hiding rows.

Cheers! :oD

Thx
MSweetG222



"StargateFan" wrote:

On Wed, 22 Feb 2006 19:27:26 -0800, "MSweetG222"
wrote:

Oops -
That formula assumes you place it in A2.
For B2 change to: =IF(ROW()=2,1,B1+1)
(I have assumed you have header row in A1 and you don't want row 1 to be #'d
& you want row 2 to be numbered 1.)

--
Thx
MSweetG222


Hi, thanks!

I used this code and then tried hiding some rows but the row numbers
jump same as with the all the other codes and don't compensate for the
hidden rows. What am I doing wrong, pls?

I have XL2K on a new Windows 2000 installation and it's the first time
I've had W2K at home. Am finding that it's doing weird things to my
standard files that Win98SE never did, so wondering if there's a
problem with the Windows version number if this code works for you.

Pls advise and thanks. :oD

"MSweetG222" wrote:

I have made several assumptions here, but try this formula:

=IF(ROW()=2,1,A1+1)

Is that what you need?

Thx
MSweetG222



"StargateFan" wrote:

In A2, =ROW-1 works until one filters rows. Also in A2,
=SUBTOTAL(3,$B$2:$B2) does work with filters but doesn't work with
hidden rows.

Is there code that will number rows consecutively even if one
_filters_ AND/OR manually _hides_ rows?? I've googled and googled the
archives but nothing comes up for this particular dual requirement.

Thanks. :oD





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
subtotal copy-paste and delete hidden rows Winslow Excel Discussion (Misc queries) 1 December 12th 06 03:26 PM
pasting to subtotal lines without replacing hidden -non-subtotal l harleydiva67 Excel Discussion (Misc queries) 1 October 12th 06 06:02 PM
Subtotal and hidden columns Anat Excel Discussion (Misc queries) 0 April 19th 06 12:41 AM
Subtotal function for hidden row [email protected] Excel Worksheet Functions 10 October 13th 05 03:04 PM
using SUBTOTAL() on rows that have been hidden doco Excel Worksheet Functions 2 June 7th 05 07:18 PM


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