View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Elegant solution for two comparisons

.. Yours is throwing up a #N/A, however.

Note that my expression assumes
In F2:G2 down are the grades and amounts, eg:
Grade F, 14,000
Grade G, 14,000


while Ron's assumptions on the inputs were the other way around,
F1: (a salary....eg 14000)
G1: (a grade....eg Grade G


That could be the reason for the error?

Anyway, for easy reference, here's a sample illustrating
both expressions under the 2 scenarios* mentioned:
http://www.freefilehosting.net/download/3b1ga
Table Extractions.xls
(I've adapted Ron's expression to suit the inputs set-up)

*Scenarios:
Scenario1: Return range A2:A4 contains only numbers
Scenario2: Return range A2:A4 contains text or mix of text/numbers

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Joe Murphy" wrote in message
...
On 24 Jan, 14:40, "Max" wrote:
"Joe Murphy" wrote:
.. Max,
Thanks, too. I'll test your solution. Looks good to me, though.


Ron's solution works just fine.
I don't understand the formula, so I'll do some reading and get back
to you if I can spot the problem. All the cells the formula points to
look fine, though..

Joe.