Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to get number of all rows in every datasheet together?
I have to count all rows in every datasheet and than get the sum of all rows
of the Excel file, that contain data. It is a large Excel file with about 80 datasheets so do it manuall is not possible. Thank you -- Regards Jan Kratochvil WIN XP Pro SP2, Office 2007 SP 1 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to get number of all rows in every datasheet together?
You could use a macro that loops through all the worksheets in that workbook.
This basis the count on the number of used rows in column A: Option Explicit Sub testme() dim TotalRows as long dim wks as worksheet totalrows = 0 for each wks in activeworkbook.worksheets totalrows = totalrows + application.counta(wks.range("A:A")) next wks msgbox totalrows End sub You could replace that msgbox with something like: worksheets("Somesheetnamehere").range("x99").value = totalrows Change the name of the worksheet and the address of the cell to what you want. If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Jan Kratochvil wrote: I have to count all rows in every datasheet and than get the sum of all rows of the Excel file, that contain data. It is a large Excel file with about 80 datasheets so do it manuall is not possible. Thank you -- Regards Jan Kratochvil WIN XP Pro SP2, Office 2007 SP 1 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
datasheet with data that is not graphed | Charts and Charting in Excel | |||
How to automate datasheet stuffing? | Excel Worksheet Functions | |||
Population org char from a datasheet | Excel Discussion (Misc queries) | |||
Text box linked to datasheet | Charts and Charting in Excel | |||
Where is the viewing datasheet button? | Charts and Charting in Excel |