View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Compare 2 columns with words to 1 and to get the 3rd word.

In Sheet2 enter the below info in ColA/B

ColA ColB
high 3
medium 2
low 1

and use the below formula in a different sheet

=INDEX(Sheet2!A1:A3,MATCH(ROUND(AVERAGE(
VLOOKUP(A1,Sheet2!$A$1:$B$3,2,0),
VLOOKUP(B1,Sheet2!$A$1:$B$3,2,0)),0),Sheet2!B1:B3, 0))

--
Jacob


"Postman" wrote:

nothing happens - gives me a error. :( i paste the whole formula -
=CHOOSE(ROUND(AVERAGE(VLOOKUP(A1,{"high",3;"low",1 ;"medium",2},2,0),VLOOKUP(B1,{"high",3;"low",1;"me dium",2},2,0)),0),"low","medium","high")

"Jacob Skaria" wrote:

and what happens when you try the below formula with cell A1 with "low",
"medium etc;

=VLOOKUP(A1,{"high",3;"low",1;"medium",2},2,0)

--
Jacob


"Postman" wrote:

In A1 i wrote - High
In B1 i wrote - Low
In C1 i paste the formula and give me error in "(VLOOKUP(A1,{" in "A1,"

"Jacob Skaria" wrote:

In cell A1 and B1 put one of the 3 status (high, low, medium) and then try
the formula in cell C1. When you say 'not working' what is the formula result.

--
Jacob


"Postman" wrote:

it's not working. Any other idea?

"Jacob Skaria" wrote:

Try

=CHOOSE(ROUND(AVERAGE(VLOOKUP(A1,{"high",3;"low",1 ;"medium",2},2,0),
VLOOKUP(B1,{"high",3;"low",1;"medium",2},2,0)),0), "low","medium","high")

--
Jacob


"Postman" wrote:

Hi All

I have question for you. I have letter "h" (from high) in column A1 and
letter "L" (from low) in column B1. In column C1 i would like to get the
avarage from them which is "m" (from Medium). How to do it?

Thanks in advance