Finding second largest, conditional value

J

jkrons

In a spreadsheet I have two columns, one with prices for all items
(Column D) and one with remarks (Column C). The rfemakrs can be emty
or Sold. Now i want to find the second most expensive item sold. I
have tried with

=SUMPRODUCT((C2:C150="sold")*(D2:D150=LARGE(D2:D150,2))*(D2:D150))

any other combinations like this, but without luck. It always seems
like i find the second most expensive price in the D-coumn, no matter
if the item is sold or not.

Any ideas

Jan
 
R

Ron Rosenfeld

In a spreadsheet I have two columns, one with prices for all items
(Column D) and one with remarks (Column C). The rfemakrs can be emty
or Sold. Now i want to find the second most expensive item sold. I
have tried with

=SUMPRODUCT((C2:C150="sold")*(D2:D150=LARGE(D2:D150,2))*(D2:D150))

any other combinations like this, but without luck. It always seems
like i find the second most expensive price in the D-coumn, no matter
if the item is sold or not.

Any ideas

Jan

Sometimes you should return a zero, with that formula.

Try this:

This formula must be **array-entered**:

=LARGE(IF(C2:C150="sold",D2:D150),2)
----------------------------------------

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl><shift> while hitting <enter>. If you did this
correctly, Excel will place braces {...} around the formula.
--ron
 
A

Aaron C

I see this a lot in this group, and have stared at the help les for
serveral hours at a time, and am still lost. When is an array formula
needed, and when is it not? Basically, what are they for?

Thanks,
Aaron C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top