Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
petess
 
Posts: n/a
Default use =countif to generate returns from more than one column

I am trying to generate returns from data in more than one column. E.g.
country and sector, so I want to count all the countries that are UAE as well
as Construction. Or Bahrain and Power, Qatar and Industry. Any ideas, guys?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default use =countif to generate returns from more than one column

Try:

=SUMPRODUCT(--(A1:A10="UAE"),--(B1:B10="Construction"))

HTH

"petess" wrote:

I am trying to generate returns from data in more than one column. E.g.
country and sector, so I want to count all the countries that are UAE as well
as Construction. Or Bahrain and Power, Qatar and Industry. Any ideas, guys?

  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default use =countif to generate returns from more than one column


Try SUMPRODUCT.

Assuming your range is A1:B10.

=SUMPRODUCT((A1:A10="UAE")*(B1:B10="Construction") )

You could also type your variables in a cell and use the cell
references so UAE in C1 and Construction in C2

=SUMPRODUCT((A1:A10=C1)*(B1:B10=C2))


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529186

  #4   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default use =countif to generate returns from more than one column


My post assumed you are trying to count the number of occurences. If
you are trying to "return" data from a different column if the
conditions are met, that would be different.

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529186

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default use =countif to generate returns from more than one column

Not much

=SUMPRODUCT(--(A1:A10="UAE"),--(B1:B10="Construction"),C1:C10)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"SteveG" wrote in
message ...

My post assumed you are trying to count the number of occurences. If
you are trying to "return" data from a different column if the
conditions are met, that would be different.

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile:

http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529186





  #6   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default use =countif to generate returns from more than one column


Bob,

You're right. Not much different.


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529186

  #7   Report Post  
Posted to microsoft.public.excel.misc
petess
 
Posts: n/a
Default use =countif to generate returns from more than one column

Guys, Many thanks to you all! You just saved/made my day!! Petess.

"Toppers" wrote:

Try:

=SUMPRODUCT(--(A1:A10="UAE"),--(B1:B10="Construction"))

HTH

"petess" wrote:

I am trying to generate returns from data in more than one column. E.g.
country and sector, so I want to count all the countries that are UAE as well
as Construction. Or Bahrain and Power, Qatar and Industry. Any ideas, guys?

  #8   Report Post  
Posted to microsoft.public.excel.misc
petess
 
Posts: n/a
Default use =countif to generate returns from more than one column

Toppers,

However, I find that I cannot use this formula to work with data from
ANOTHER worksheet within the same Excel file... :o(

Petess

"Toppers" wrote:

Try:

=SUMPRODUCT(--(A1:A10="UAE"),--(B1:B10="Construction"))

HTH

"petess" wrote:

I am trying to generate returns from data in more than one column. E.g.
country and sector, so I want to count all the countries that are UAE as well
as Construction. Or Bahrain and Power, Qatar and Industry. Any ideas, guys?

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
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
IF/AND/OR/DATEIF Issue...sorry...long post... EDSTAFF Excel Worksheet Functions 1 November 10th 05 12:28 AM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 12:24 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"