# Compare cells, if true, result in another column

1. ## Compare cells, if true, result in another column

Hi all,

See attachment for example

My students takes an exam.

Student has 19 points (M5 =SUM(C5:L5)) of 110 points.

2,6 is than the result of the student his exam

I want to compare colums M with column O and column O with column P.

Result column P sets automatically in column B

Example:

I want that Excel automatically set B5 to 2,6

M5 result compare with O1:O223, if true compare it with P1:P223 and that's the result for B5.

What's the correct formula?

2. ## Re: Compare cells, if true, result in another column

Try

=VLOOKUP(\$M5,\$O\$1:\$P\$223,2,FALSE)

3. ## Re: Compare cells, if true, result in another column

When i do that, i've got an error, see attachment

4. ## Re: Compare cells, if true, result in another column

change "," to ";"

5. ## Re: Compare cells, if true, result in another column

When i do that, i've got the error: #NAME?

6. ## Re: Compare cells, if true, result in another column

Never mind, the solutions:
=VLOOKUP(M6;\$O\$1:\$P\$223;2;FALSE)

7. ## Re: Compare cells, if true, result in another column

My typo!!! sorry!

=VLOOKUP(\$M5;\$O\$1:\$P\$223,2;FALSE)

8. ## Re: Compare cells, if true, result in another column

Welcome to the forum.

We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

(Note: this requirement is not optional. As you are new, I have done it for you this time: https://www.mrexcel.com/board/thread...olumn.1186597/.)

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1