ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   LOOKUP? (https://www.excelbanter.com/excel-discussion-misc-queries/236957-lookup.html)

Keith - NRCS[_2_]

LOOKUP?
 
I've got another formula question if someone could please help.

I have a list of CRP Practices (columnA) some of which pay out a bonus of
20% and some do not. The CRP Practices are in a drop down list in columnA. I
want the SRR Bonus (columnB) to automatically enter "20%" or "None" depending
on which corresponding CRP Practice is selected in columnA. I tried to use
the LOOKUP command but it doesn't always work and I believe it has something
to do with the practices not being in numerical order (according to Excel). I
could sort them, but I'd rather they stay in the order that I choose...not
how Excel sorts them.

Any suggestions?

EX:

Column A Column B
CRP Practice SRR Bonus
CP-5A 20%
CP-16A N
CP-21 20%
CP-23A 20%
CP-25 N

NBVC[_105_]

LOOKUP?
 

If you don't want to sort them, then use VLOOKUP() with FALSE as the 4th
argument...

e.g

=VLOOKUP(A1,list_table,2,FALSE)

will lookup the value from A1 in your 2-column list_table and extract
from the 2nd column (independent of sort order).


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116328


Keith - NRCS[_2_]

LOOKUP?
 
OK its working sort-of...is there a way to get "None" in Column B if the 20%
bonus does not apply?

"NBVC" wrote:


If you don't want to sort them, then use VLOOKUP() with FALSE as the 4th
argument...

e.g

=VLOOKUP(A1,list_table,2,FALSE)

will lookup the value from A1 in your 2-column list_table and extract
from the 2nd column (independent of sort order).


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116328



NBVC[_107_]

LOOKUP?
 

Isn't that in the table as "N"?

just change the "N" in the table to "None".


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116328


Keith - NRCS[_2_]

LOOKUP?
 
THANKS!

"NBVC" wrote:


Isn't that in the table as "N"?

just change the "N" in the table to "None".


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116328




All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com