#1   Report Post  
aspencer27
 
Posts: n/a
Default database criteria

For the dmax example in excel help it shows the table below. It shows how to
find the max profit of apple and pear trees, or the max profit of apple
trees. Because the criteria requires a column label ("Tree"), is there any
way to find the max profit of just pear trees? I tried
dmax(A4:E10,"Profit",A3), but this returned #VALUE! because the column label
is not included in the criteria. Thanks!

A B C D E F
1 Tree Height Age Yield Profit Height
2 Apple 10 <16
3 Pear
4 Tree Height Age Yield Profit
5 Apple 18 20 14 105.00
6 Pear 12 12 10 96.00
7 Cherry 13 14 9 105.00
8 Apple 14 15 10 75.00
9 Pear 9 8 8 76.80
10 Apple 8 9 6 45.00
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=sumproduct(max((a5:a10="Pear")*(e5:e10)))

"aspencer27" wrote in message
...
For the dmax example in excel help it shows the table below. It shows how
to
find the max profit of apple and pear trees, or the max profit of apple
trees. Because the criteria requires a column label ("Tree"), is there any
way to find the max profit of just pear trees? I tried
dmax(A4:E10,"Profit",A3), but this returned #VALUE! because the column
label
is not included in the criteria. Thanks!

A B C D E F
1 Tree Height Age Yield Profit Height
2 Apple 10 <16
3 Pear
4 Tree Height Age Yield Profit
5 Apple 18 20 14 105.00
6 Pear 12 12 10 96.00
7 Cherry 13 14 9 105.00
8 Apple 14 15 10 75.00
9 Pear 9 8 8 76.80
10 Apple 8 9 6 45.00



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

Array entered (meaning press Ctrl-Shift-Enter to commit the formula):

=MAX(--(A2:A7="Pear")*E2:E7)

"aspencer27" wrote:

For the dmax example in excel help it shows the table below. It shows how to
find the max profit of apple and pear trees, or the max profit of apple
trees. Because the criteria requires a column label ("Tree"), is there any
way to find the max profit of just pear trees? I tried
dmax(A4:E10,"Profit",A3), but this returned #VALUE! because the column label
is not included in the criteria. Thanks!

A B C D E F
1 Tree Height Age Yield Profit Height
2 Apple 10 <16
3 Pear
4 Tree Height Age Yield Profit
5 Apple 18 20 14 105.00
6 Pear 12 12 10 96.00
7 Cherry 13 14 9 105.00
8 Apple 14 15 10 75.00
9 Pear 9 8 8 76.80
10 Apple 8 9 6 45.00

  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

I should have pointed out that the column headings were in row 1 and the
formula assumes the data is in rows 2 thru 7

"aspencer27" wrote:

For the dmax example in excel help it shows the table below. It shows how to
find the max profit of apple and pear trees, or the max profit of apple
trees. Because the criteria requires a column label ("Tree"), is there any
way to find the max profit of just pear trees? I tried
dmax(A4:E10,"Profit",A3), but this returned #VALUE! because the column label
is not included in the criteria. Thanks!

A B C D E F
1 Tree Height Age Yield Profit Height
2 Apple 10 <16
3 Pear
4 Tree Height Age Yield Profit
5 Apple 18 20 14 105.00
6 Pear 12 12 10 96.00
7 Cherry 13 14 9 105.00
8 Apple 14 15 10 75.00
9 Pear 9 8 8 76.80
10 Apple 8 9 6 45.00

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
database criteria Dan in NY Excel Worksheet Functions 3 February 9th 05 07:29 PM
Function that filters a list (Database) for criteria in a range a. FirstVette52 Excel Worksheet Functions 0 February 8th 05 04:37 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM
Graphing Database Growth Rate DavidM Charts and Charting in Excel 1 February 2nd 05 12:01 AM
Specify a null value in an Excel Database criteria range Johnnyy2k Excel Worksheet Functions 2 December 28th 04 04:43 PM


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