Count No of Rows (Different Sheet) Summary

markandan26

New Member
Joined
Aug 22, 2015
Messages
7
Hi All,

I have one Excel which I am having nearly 20 different sheets, now I want in another sheet, in which i should have two columns like “Name of the sheet” and “number of rows”.
Ex: In sheet called Mercury and its having 25 rows, now this should appear like
Sheet Name No. of Rows
Mercury 25
Like this I want for all the 20 sheets information. Hope I am clear with my query. Can someone please help on this?

Thanks,
Mark
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Do not understand "number of rows".
Do you mean number of filled rows?
And what column are we looking in for number of filled rows?
 
Upvote 0
Maybe he means how to link the sheet name in column A into the formula in column B without having to type it in. Otherwise, it's just a simple formula (based on the column that has the data for counting)

Code:
=COUNTA(Sheet1!A1:A1048576)
 
Upvote 0
Hi,

Yes, i already told, that i have 20 worksheets. Each worksheets having some data
ex: sheet1 contain 30 recordss
like tis sheet2 30
sheet3 40


etc............

wht i need is....make summary in new sheet

Like

[TABLE="class: outer_border, width: 500, align: center"]
<tbody>[TR]
[TD]SHeet name[/TD]
[TD]Count of records[/TD]
[/TR]
[TR]
[TD]Sheet1 [/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Sheet2[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Sheet3[/TD]
[TD]40[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Try this:

Code:
Option Explicit
Sub ShtRow_Counting()
    Dim oWbk As Workbook
    Dim oSht As Worksheet
    Dim x As Integer
    Set oWbk = ActiveWorkbook
    Worksheets.Add After:=Sheets(Worksheets.Count)
    ActiveSheet.Name = "Row Counts"
    Range("A1").Value = "SHeet name"
    Range("B1").Value = "Count of records"
    x = 2
    For Each oSht In oWbk.Worksheets
        Range("A" & x).Value = oSht.Name
        Range("B" & x).Formula = "=COUNTA('" & oSht.Name & "'!A1:A" & Rows.Count & ")"
        x = x + 1
    Next oSht
    MsgBox "Done."
End Sub
 
Upvote 0
I have exactly same problem. Is there a formula I could use to solve this?
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top