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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Urgent Help - CountIf



 
 
Thread Tools Display Modes
  #1  
Old April 13th, 2009, 03:22 PM posted to microsoft.public.excel.misc
Jeff
external usenet poster
 
Posts: 1,347
Default Urgent Help - CountIf

Hello,

In Sheet 1 Column B, I urgently need a formula to would execute the following:
Take Column A value = "Red" in sheet 1.

I need to look for value = "Red" in Sheet 2 column B and take the value in
Column C only if and only if Column A value= 2010

Sheet 2
2010 Red $10
2015 Red $15
2017 Red $16

  #2  
Old April 13th, 2009, 03:31 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Urgent Help - CountIf

Jeff,

This goes on Sheet1 and looks for "Red" in A1

=INDEX(Sheet2!C1:C20,MATCH(1,(Sheet2!B1:B20=A1)*(S heet2!A1:A20=2010),0))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

"Jeff" wrote:

Hello,

In Sheet 1 Column B, I urgently need a formula to would execute the following:
Take Column A value = "Red" in sheet 1.

I need to look for value = "Red" in Sheet 2 column B and take the value in
Column C only if and only if Column A value= 2010

Sheet 2
2010 Red $10
2015 Red $15
2017 Red $16

  #3  
Old April 13th, 2009, 03:36 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Urgent Help - CountIf

I may have misunderstood, do you want this

=SUMPRODUCT((Sheet2!B1:B20=A1)*(Sheet2!A1:A20=2010 )*(Sheet2!C1:C20))

Mike

"Mike H" wrote:

Jeff,

This goes on Sheet1 and looks for "Red" in A1

=INDEX(Sheet2!C1:C20,MATCH(1,(Sheet2!B1:B20=A1)*(S heet2!A1:A20=2010),0))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

"Jeff" wrote:

Hello,

In Sheet 1 Column B, I urgently need a formula to would execute the following:
Take Column A value = "Red" in sheet 1.

I need to look for value = "Red" in Sheet 2 column B and take the value in
Column C only if and only if Column A value= 2010

Sheet 2
2010 Red $10
2015 Red $15
2017 Red $16

 




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 04:30 AM.


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