View Single Post
  #9   Report Post  
Tushar Mehta
 
Posts: n/a
Default

Here's a much cleaner way of implementing a VLOOKUP -- without creating
a nightmare in trying to understand or maintain your worksheet.

Put the various entries in a table. I selected A3:B11

Clinton 0.25
Bush 0.25
Carter 0.25
Roosevelt 0.45
Nixon 0.54
Pierce 0.99
Taylor 0.37
Washington 0.37
Adams 0.37

Now, suppose the entity you are searching for is in C3. Then, the
formula =VLOOKUP(C3,A3:B11,2,FALSE) will give you what you want.

And, the overall result is so much easier to understand and maintain!

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi, I am looking for a formula that does the following:

if "Clinton", "Bush", or "Carter", then enter "$0.25"
if "Taylor", "Washington", or "Adams", then enter "$0.37"
if "Roosevelt", then enter "$0.45"
if "Nixon", then enter "$0.54"
if "Pierce", then enter "$0.99"

Is there such a formula. More importantly, is there such a formula that is
not binary, since I would prefer not to have to use nesting.

Thanks!