#1   Report Post  
ah
 
Posts: n/a
Default 2 way lookups

A B C
1 Country Rev Class Sales
2 (Denmark) 1 139,403.82
3 (Denmark) 2 179,950.00
4 (Finland) 1 10,633.44
5 (Finland) 2 40,297.50
6 (Norway) 1 143,035.28
7 (Norway) 2 109,740.00

I want to return the sales value where country = "Denmark" and rev class
="2" (in other words cell "c3")

I am usiing windows 2003
--
thanks

ah
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=sumproduct(--(a1:a9999=3),--(b1:b9999="Denmark),(c1:c9999))

"ah" wrote in message
...
A B C
1 Country Rev Class Sales
2 (Denmark) 1 139,403.82
3 (Denmark) 2 179,950.00
4 (Finland) 1 10,633.44
5 (Finland) 2 40,297.50
6 (Norway) 1 143,035.28
7 (Norway) 2 109,740.00

I want to return the sales value where country = "Denmark" and rev class
="2" (in other words cell "c3")

I am usiing windows 2003
--
thanks

ah



  #3   Report Post  
ah
 
Posts: n/a
Default

Hi N Harkawat,

This worked great & your solution even allowed me throw in a third
variable. But I have a question, what does - - do.



"N Harkawat" wrote:

=sumproduct(--(a1:a9999=3),--(b1:b9999="Denmark),(c1:c9999))

"ah" wrote in message
...
A B C
1 Country Rev Class Sales
2 (Denmark) 1 139,403.82
3 (Denmark) 2 179,950.00
4 (Finland) 1 10,633.44
5 (Finland) 2 40,297.50
6 (Norway) 1 143,035.28
7 (Norway) 2 109,740.00

I want to return the sales value where country = "Denmark" and rev class
="2" (in other words cell "c3")

I am usiing windows 2003
--
thanks

ah




  #4   Report Post  
Ola
 
Posts: n/a
Default

-- is the most common way to turn True or False into 1 or 0.
It's required in certain formulas, like SUMPRODUCT, to make it Calculable.

Ola Sandstrom

-True=-1, -False=0
--True=1, --False=0
True*1=1, False*1=0
True+0=1, False+0=0

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
lookups referring to formulas Excel GuRu Excel Discussion (Misc queries) 5 January 5th 05 03:55 PM
Double Lookups Philippe L. Balmanno Excel Worksheet Functions 11 November 11th 04 10:33 PM


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