PC Review


Reply
Thread Tools Rate Thread

Count of Worksheet rows and recording this count

 
 
mikerobe
Guest
Posts: n/a
 
      21st Mar 2007
Hi,
I have data in a Worksheet (Sheet1) in Columns A and B, the number of
rows of data is variable. The first and last row of data is a header
and footer. I need to count the rows in between the header and footer
(not counting the header and footer rows) and place this count (same
number) in the header row and footer row in Coulum C. For example the
count in the header row would be placed in cell C1 and the count in
the footer is in cell CX (x being a variable)

I hope this is clear

Thanks for any help
Mike

 
Reply With Quote
 
 
 
 
JMay
Guest
Posts: n/a
 
      21st Mar 2007
I'de put in cell B1 =COUNTA(A:A)-2

What else is in Column B (B2:B99) say?

If nothing then enter in B2 and copy down

=IF(A2="Footer",B$1,"")

Maybe..??


"mikerobe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> Hi,
> I have data in a Worksheet (Sheet1) in Columns A and B, the number of
> rows of data is variable. The first and last row of data is a header
> and footer. I need to count the rows in between the header and footer
> (not counting the header and footer rows) and place this count (same
> number) in the header row and footer row in Coulum C. For example the
> count in the header row would be placed in cell C1 and the count in
> the footer is in cell CX (x being a variable)
>
> I hope this is clear
>
> Thanks for any help
> Mike


 
Reply With Quote
 
mikerobe
Guest
Posts: n/a
 
      21st Mar 2007
On Mar 21, 1:17 am, "JMay" <j...@cox.net> wrote:
> I'de put in cell B1 =COUNTA(A:A)-2
>
> What else is in Column B (B2:B99) say?
>
> If nothing then enter in B2 and copy down
>
> =IF(A2="Footer",B$1,"")
>
> Maybe..??
>
> "mikerobe" <eid...@gmail.com> wrote in message
>
> news:(E-Mail Removed):
>
>
>
> > Hi,
> > I have data in aWorksheet(Sheet1) in Columns A and B, the number of
> >rowsof data is variable. The first and last row of data is a header
> > and footer. I need tocounttherowsin between the header and footer
> > (not counting the header and footerrows) and place thiscount(same
> > number) in the header row and footer row in Coulum C. For example the
> >countin the header row would be placed in cell C1 and thecountin
> > the footer is in cell CX (x being a variable)

>
> > I hope this is clear

>
> > Thanks for any help
> > Mike- Hide quoted text -

>
> - Show quoted text -


Thanks for the suggestion JMay
But there is awways data in Column B from B1 to B99 (for example) but
as I say this is variable in that the dat could end in B60.

Thanks
Mike

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datatable rows count and dataview count differ John Hui Microsoft ADO .NET 4 3rd Aug 2010 10:26 PM
Count Displayed Rows of a Filtered Worksheet Norman Zhang Microsoft Excel Discussion 2 7th Oct 2009 02:31 PM
Compare and Count data in worksheet rows. jethro71301 Microsoft Excel Programming 2 17th Feb 2008 12:23 AM
Why does rngDataSource.Rows.Count = 65536 when worksheet Rows=95? Dennis@NoSpam.com Microsoft Excel Misc 12 22nd Jul 2005 12:50 PM
I am adding a new row to the datagrid dynamically but if i use the Count property of Item it is not showing the count of the new rows being added Praveen Balanagendra via .NET 247 Microsoft ASP .NET 2 6th Jun 2004 08:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:38 PM.