Author: Adrian
• Friday, January 08th, 2010

A visitor asked

Adrian,
I’m struggling unsuccessfully @ the following problem, (not winning)

This has to do with comparing 3 sets of columns and the variable, differing answers.

The Columns are: S,T,U are being compared to columns X,Y,Z
S is compared to X
T is compared to Y
U is compared to Z

Ideally, if you can figure this out for me please, it would be neat to get the answers, in A same single cell.
If not possible, I quit……

If  S,T,U, are Less than than X,Y,Z,     (answer expressed as “PPP”).
If S>X=”M”, T<Y=”P”, & U<Z=”P”          (answer is expressed as “MPP”)
If  S>X =”M”, T>Y=”M”, & U<Z=”P”        (answer is expressed as “MMP”)

If the S,T,U are GREATER than X,Y,Z,  (answer expressed as “MMM”.
If  S<X=”P”, T<Y=”P”, & U>Z=”M”        (answer is expressed as “PPM”)
If S<X=”P”, T>Y=”M”, & U>Z=”M”        (answer is expressed as “PMM”)
Lastly, if possible, (coz this is number 7, right?) If either OR, X,Y,Z, is greater than S,T,U by greater than 60%, the answer is expressed as= “X”

Is this too much for Excell?
What’s the 2nd best option?
Hope you can help me.

The question is a bit unclear but from what we see you should be using the AND and OR commands. See how to use them on http://www.auditexcel.co.za/AND_OR.html . Hope this helps, otherwise it is better to send a spreadsheet.

2 Responses

  1. I just downloaded your IRR calculator for financial decisions. It appears to be working, but on one array of values I am getting a result of #NUM!.

    If I change the negative value to a small enough number, it gives me a result. What does teh #NUM! mean?

    Thanks.

  2. 2
    superposed 
    Monday, 26. July 2010

    When X,Y or Z are 60% greater than S,T or U (respectively), do you want to replace the whole code by “X”, or just the M/P part for that particular pair? Also, how do you want to handle ties?

    Here are two ways of doing it, with an “IF()” function. The first replaces the whole code with an “X”, the second only replaces part of the code with an “X”. Note that in Excel, “&” means “stick these two strings together.” You can change how ties are handled by using “>=” instead of “>”.

    (1) =IF(OR(X>1.6*S, Y>1.6*T, Z>1.6*U), “=”, IF(S>X, “M”, “P”) & IF(T>Y, “M”, “P”) & IF(U>Z, “M”, “P”))
    (2) =IF(X>1.6*S, “X”, IF(S>X, “M”, “P”)) & IF(Y>1.6*T, “X”, IF(T>Y, “M”, “P”)) & IF(Z>1.6*U, “X”, IF(U>Z, “M”, “P”))

Leave a Reply