Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default countif in many worksheets

I have 12 worksheets with different names (I wish, I didn't change names
from Sheet[numbers] *)
I want to perform counta command on column A of each sheet in my reference
sheet.
With a Macro (Given by Gord Dibben) I was able to produce a list of sheet
names in my reference sheet.
Now I dont know how to address these names in counta command. On each sheet
it will be simply: counta(A:A)

Also is there any resources in Internet explaining about dealing with
calculation in different sheets.

*) I think if I leave name of sheets unchanged (Sheet[numbers]) then it will
be easy to use sheet names in commands. Isn't it so?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default countif in many worksheets

I find following solution. Although it is not a robust solution but solves
my problem.
If anybody else finds a better solution, let me know. Solution:
Assuming the sheetname is in a1
b1=COUNTA(INDIRECT(ADDRESS(1,1,4,TRUE,A1)):INDIREC T(ADDRESS(100,1,4,TRUE,A1)))

This solution assumes number of rows in each sheet is not more than 100. it
could be adjusted for any range.
Address part gives address of starting cell and ending cell in destination
sheet, using sheet name in a1. 4 is used to give relative reference so that
we can drag down.
Indirect converts this text address to real reference address.
counta needs two address of start and end of range which is produced as
explained above.


"Rasoul Khoshravan" wrote in message
...
I have 12 worksheets with different names (I wish, I didn't change names
from Sheet[numbers] *)
I want to perform counta command on column A of each sheet in my reference
sheet.
With a Macro (Given by Gord Dibben) I was able to produce a list of sheet
names in my reference sheet.
Now I dont know how to address these names in counta command. On each
sheet it will be simply: counta(A:A)

Also is there any resources in Internet explaining about dealing with
calculation in different sheets.

*) I think if I leave name of sheets unchanged (Sheet[numbers]) then it
will be easy to use sheet names in commands. Isn't it so?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default countif in many worksheets

Leaving the sheets named as Sheet1, Sheet2, Sheet3, etc could make things a
little easier, but things work the same either way. The way to refer to
cells on another sheet in Excel looks like this (assume you're on Sheet2 and
want to refer to cells on Sheet1:
=Counta('Sheet1'!A:A)
purists will tell you that the ' marks aren't needed here, and they are not
in this case, but if your sheet name has a space in it, they are, so I showed
them. No harm in using them when they aren't required, but would be if they
were missing and the sheet name had a space in it, as:
=Counta('Last Quarterly Results'!A:A)

Hope this helps make things easier for you in the future.

"Rasoul Khoshravan" wrote:

I have 12 worksheets with different names (I wish, I didn't change names
from Sheet[numbers] *)
I want to perform counta command on column A of each sheet in my reference
sheet.
With a Macro (Given by Gord Dibben) I was able to produce a list of sheet
names in my reference sheet.
Now I dont know how to address these names in counta command. On each sheet
it will be simply: counta(A:A)

Also is there any resources in Internet explaining about dealing with
calculation in different sheets.

*) I think if I leave name of sheets unchanged (Sheet[numbers]) then it will
be easy to use sheet names in commands. Isn't it so?


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
Command to count number of worksheets in a workbook? Saul Fowler Excel Worksheet Functions 3 February 6th 08 12:46 PM
COUNTIF across a number of worksheets Rup1776 Excel Worksheet Functions 1 September 13th 06 10:41 AM
Duplicate Worksheets mlofton Excel Discussion (Misc queries) 1 September 7th 05 02:58 PM
Changing a Link Mid-way Across Worksheets Frosty Excel Worksheet Functions 0 August 25th 05 12:03 AM
Countif multiple worksheets Natalie Excel Worksheet Functions 4 March 8th 05 12:35 PM


All times are GMT +1. The time now is 11:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"