Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Counting values in mulitple worksheets

I am trying to count values in a specific cell on multiple worksheets. (The
cell is in the same location on all the worksheets). Something like this:
Count all values = to "Y" in cell A24 on all worksheets.

Anyone have any suggestions?




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Counting values in mulitple worksheets

It can be somewhat complicated if you have a lot of sheets.

List your sheet names in a range of cells. Assume this list is in the range
G1:G10.

=SUMPRODUCT(COUNTIF(INDIRECT("'"&G1:G10&"'!A24")," Y"))

It might be easier to just use another cell (the same cell) on each sheet
with this formula:

=--(A24="Y")

Then just use a sum formula like this:

=SUM(Sheet1:Sheet10!A1)

--
Biff
Microsoft Excel MVP


"Joan" wrote in message
...
I am trying to count values in a specific cell on multiple worksheets. (The
cell is in the same location on all the worksheets). Something like this:
Count all values = to "Y" in cell A24 on all worksheets.

Anyone have any suggestions?






  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default Counting values in mulitple worksheets

This code works (sort of). It creates a user defined function. the
only bug is that it won't work if the "ref" variable is the same as
the cell the formula is currently in.

To use the formula, enter countif_multiple_tabs("Y", "A24").

Per my first statement, this will work so long as you don't put the
formula in cell A24.


Function countif_multiple_tabs(search_string As String, ref As String)

search_count = 0
For i = 1 To Application.Worksheets.Count
If Worksheets(i).Range(ref).Value = search_string Then
search_count = search_count + 1
Next

countif_multiple_tabs = search_count

End Function





On Jul 3, 8:36*pm, Joan wrote:
I am trying to count values in a specific cell on multiple worksheets. (The
cell is in the same location on all the worksheets). *Something like this: *
Count all values = to "Y" *in cell A24 on all worksheets. *

Anyone have any suggestions?


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
Merging data from mulitple worksheets jjjam Excel Worksheet Functions 4 November 3rd 08 11:39 PM
Counting occurance of text values across multiple worksheets Jiq Excel Worksheet Functions 4 May 22nd 06 04:17 PM
How do I sum totals from mulitple worksheets unwizzed Excel Worksheet Functions 1 April 19th 06 10:43 PM
mulitple worksheets vlookup Max_power Excel Discussion (Misc queries) 7 March 21st 06 04:06 PM
Changes to Mulitple Worksheets Mac Landers Excel Worksheet Functions 3 January 26th 05 12:59 AM


All times are GMT +1. The time now is 05:32 PM.

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"