A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help Needed with Dynamic CountIF



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2010, 11:36 AM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default Help Needed with Dynamic CountIF

Hello All.

I have a sheet like this on a tab called Summary:

Month: Jan'10 (This is a drop down list showing all months)

Sales Person New Clients Sec Lead Source Minutes
SB GR Gen Pros
SB SB DB Pros
SB SB Pros
JS N/A

I have 12 additional tabs (Jan'10, Feb'10, Mar'10..etc etc etc)

What I am trying to achieve is a count of some data from the sheets on the
other tabs. This is what i have so far:

=COUNTIFS('Jan''10'!C:C,E10,'Jan''10'!M:M,G10,'Jan ''10'!H:H,$D$5)

FYI D5 (at the end) refers to the drop down month field as above. You will
note that the formula above only refers to the tab 'Jan'10, what i need is
for the tab reference to be dynamic based on what the user selects in D5, so
for example, if the D5 = Feb'10 then the formula would be:

=COUNTIFS('Feb''10'!C:C,E10,'Feb''10'!M:M,G10,'Feb ''10'!H:H,$D$5)

I have a good level of skill in excel but nothing with VB so any ideas would
be much appreciated.

Steve

Ads
  #2  
Old April 26th, 2010, 11:43 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_]
external usenet poster
 
Posts: 489
Default Help Needed with Dynamic CountIF

No need for VBA

=COUNTIFS(INDIRECT("'"&D5&"'!C:C"),E10,INDIRECT("' "&D5&"'!M:M"),G10,INDIRECT("'"&D5&"'!H:H"),$D$ 5)


--

HTH

Bob

"Steve" wrote in message
...
Hello All.

I have a sheet like this on a tab called Summary:

Month: Jan'10 (This is a drop down list showing all months)

Sales Person New Clients Sec Lead Source Minutes
SB GR Gen Pros
SB SB DB Pros
SB SB Pros
JS N/A

I have 12 additional tabs (Jan'10, Feb'10, Mar'10..etc etc etc)

What I am trying to achieve is a count of some data from the sheets on the
other tabs. This is what i have so far:

=COUNTIFS('Jan''10'!C:C,E10,'Jan''10'!M:M,G10,'Jan ''10'!H:H,$D$5)

FYI D5 (at the end) refers to the drop down month field as above. You will
note that the formula above only refers to the tab 'Jan'10, what i need is
for the tab reference to be dynamic based on what the user selects in D5,
so
for example, if the D5 = Feb'10 then the formula would be:

=COUNTIFS('Feb''10'!C:C,E10,'Feb''10'!M:M,G10,'Feb ''10'!H:H,$D$5)

I have a good level of skill in excel but nothing with VB so any ideas
would
be much appreciated.

Steve



  #3  
Old April 26th, 2010, 12:17 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Help Needed with Dynamic CountIF

Hi Steve

Try the below

=COUNTIFS(INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!C:C"),E10,
INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!M:M"),G10,
INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!H:H"),$D$5)

--
Jacob (MVP - Excel)


"Steve" wrote:

Hello All.

I have a sheet like this on a tab called Summary:

Month: Jan'10 (This is a drop down list showing all months)

Sales Person New Clients Sec Lead Source Minutes
SB GR Gen Pros
SB SB DB Pros
SB SB Pros
JS N/A

I have 12 additional tabs (Jan'10, Feb'10, Mar'10..etc etc etc)

What I am trying to achieve is a count of some data from the sheets on the
other tabs. This is what i have so far:

=COUNTIFS('Jan''10'!C:C,E10,'Jan''10'!M:M,G10,'Jan ''10'!H:H,$D$5)

FYI D5 (at the end) refers to the drop down month field as above. You will
note that the formula above only refers to the tab 'Jan'10, what i need is
for the tab reference to be dynamic based on what the user selects in D5, so
for example, if the D5 = Feb'10 then the formula would be:

=COUNTIFS('Feb''10'!C:C,E10,'Feb''10'!M:M,G10,'Feb ''10'!H:H,$D$5)

I have a good level of skill in excel but nothing with VB so any ideas would
be much appreciated.

Steve

  #4  
Old April 26th, 2010, 03:01 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default Help Needed with Dynamic CountIF

Worked a dream!! thank you very much!! - much much apprecaited

"Jacob Skaria" wrote:

Hi Steve

Try the below

=COUNTIFS(INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!C:C"),E10,
INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!M:M"),G10,
INDIRECT("'" & SUBSTITUTE($D$5,"'","''") & "'!H:H"),$D$5)

--
Jacob (MVP - Excel)


"Steve" wrote:

Hello All.

I have a sheet like this on a tab called Summary:

Month: Jan'10 (This is a drop down list showing all months)

Sales Person New Clients Sec Lead Source Minutes
SB GR Gen Pros
SB SB DB Pros
SB SB Pros
JS N/A

I have 12 additional tabs (Jan'10, Feb'10, Mar'10..etc etc etc)

What I am trying to achieve is a count of some data from the sheets on the
other tabs. This is what i have so far:

=COUNTIFS('Jan''10'!C:C,E10,'Jan''10'!M:M,G10,'Jan ''10'!H:H,$D$5)

FYI D5 (at the end) refers to the drop down month field as above. You will
note that the formula above only refers to the tab 'Jan'10, what i need is
for the tab reference to be dynamic based on what the user selects in D5, so
for example, if the D5 = Feb'10 then the formula would be:

=COUNTIFS('Feb''10'!C:C,E10,'Feb''10'!M:M,G10,'Feb ''10'!H:H,$D$5)

I have a good level of skill in excel but nothing with VB so any ideas would
be much appreciated.

Steve

  #5  
Old April 26th, 2010, 03:01 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default Help Needed with Dynamic CountIF

Some reason just returned #value ??? but Jacobs idea worked fine so thanks
anyway!

"Bob Phillips" wrote:

No need for VBA

=COUNTIFS(INDIRECT("'"&D5&"'!C:C"),E10,INDIRECT("' "&D5&"'!M:M"),G10,INDIRECT("'"&D5&"'!H:H"),$D$ 5)


--

HTH

Bob

"Steve" wrote in message
...
Hello All.

I have a sheet like this on a tab called Summary:

Month: Jan'10 (This is a drop down list showing all months)

Sales Person New Clients Sec Lead Source Minutes
SB GR Gen Pros
SB SB DB Pros
SB SB Pros
JS N/A

I have 12 additional tabs (Jan'10, Feb'10, Mar'10..etc etc etc)

What I am trying to achieve is a count of some data from the sheets on the
other tabs. This is what i have so far:

=COUNTIFS('Jan''10'!C:C,E10,'Jan''10'!M:M,G10,'Jan ''10'!H:H,$D$5)

FYI D5 (at the end) refers to the drop down month field as above. You will
note that the formula above only refers to the tab 'Jan'10, what i need is
for the tab reference to be dynamic based on what the user selects in D5,
so
for example, if the D5 = Feb'10 then the formula would be:

=COUNTIFS('Feb''10'!C:C,E10,'Feb''10'!M:M,G10,'Feb ''10'!H:H,$D$5)

I have a good level of skill in excel but nothing with VB so any ideas
would
be much appreciated.

Steve



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.