Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
artisanpp
 
Posts: n/a
Default COUNTIF formula problems


Hi All

I am trying to use this countif formula for all the sheets in my
workbook (currently only 2 sheets)
=COUNTIF('Sea King Adv. june 1:Myrtle Winchester
june2'!A22:A45,"ZY340")

sea king and myrtle represent the name of the sheets, and I am trying
to see if the text ZY340 appears in cells a22 to a45 of both sheets,
and if it does to total it on another blank sheet which I will call
sheet 1

Using the formula for a single sheet does work, but when I add the
other sheet I keep getting an error

If anyone could help me refine this and make it work that would be
excellent

thanks in advance
gino


--
artisanpp
------------------------------------------------------------------------
artisanpp's Profile: http://www.excelforum.com/member.php...o&userid=23593
View this thread: http://www.excelforum.com/showthread...hreadid=375801

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

This will work

=SUMPRODUCT(COUNTIF(INDIRECT("'"&{"Sea King Adv. june1";"Myrtle Winchester
june2"}&"'!A22:A45"),"ZY340"))


better to use

=SUMPRODUCT(COUNTIF(INDIRECT("'"&N1:N2&"'!A22:A45" ),"ZY340"))


Where N1 and N2 holds the 2 names of the sheets, if you expand ywith let's
say 2 more sheet you can just change it to

=SUMPRODUCT(COUNTIF(INDIRECT("'"&N1:N4&"'!A22:A45" ),"ZY340"))

and put the sheet names into the cells


Regards,

Peo Sjoblom

"artisanpp" wrote:


Hi All

I am trying to use this countif formula for all the sheets in my
workbook (currently only 2 sheets)
=COUNTIF('Sea King Adv. june 1:Myrtle Winchester
june2'!A22:A45,"ZY340")

sea king and myrtle represent the name of the sheets, and I am trying
to see if the text ZY340 appears in cells a22 to a45 of both sheets,
and if it does to total it on another blank sheet which I will call
sheet 1

Using the formula for a single sheet does work, but when I add the
other sheet I keep getting an error

If anyone could help me refine this and make it work that would be
excellent

thanks in advance
gino


--
artisanpp
------------------------------------------------------------------------
artisanpp's Profile: http://www.excelforum.com/member.php...o&userid=23593
View this thread: http://www.excelforum.com/showthread...hreadid=375801


  #3   Report Post  
artisanpp
 
Posts: n/a
Default


Hi Peo

Thank yor for your help, I will try this.

best regards
gino


--
artisanpp
------------------------------------------------------------------------
artisanpp's Profile: http://www.excelforum.com/member.php...o&userid=23593
View this thread: http://www.excelforum.com/showthread...hreadid=375801

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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Problems with the VLOOKUP formula Peter Excel Worksheet Functions 2 March 9th 05 03:59 AM
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
Howdo U copy a formula down a column, that uses data in another w. brantty Excel Worksheet Functions 0 February 25th 05 10:11 AM
Relative Indirect Formula Referencing? Damian Excel Worksheet Functions 1 January 7th 05 04:16 AM


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

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

About Us

"It's about Microsoft Excel"