Lookup Function

  • Thread starter Thread starter Neil Greenough
  • Start date Start date
N

Neil Greenough

In Column A, I have the following listed down the column:

Initial
Independent
2
3
4
5
etc etc....

Now in Column B next to these, I have a corresponding monetary value. Now,
My lookup function works for the numbers but it doesn't work for the words
'initial' or 'independent'. Any ideas why? The numbers bring back the
corresponding value perfectly but if I choose 'initial' it bring back a
wrong value.

Here's my function:

=N5*24*LOOKUP(C2,A2:A13,B2:B13)
 
From Excel's help for LOOKUP: The values in lookup_vector must be placed in
ascending order: ...,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE

so think your list
Initial
Independent
2
3
4
5
etc

needs to be re-sorted as:
2
3
4
5 etc
Independent
Initial

An alternative is to use VLOOKUP instead, e.g.:
=VLOOKUP(C2,$A$2:$B$13,2,0)


--
 
An alternative is to use VLOOKUP instead, e.g.:
=VLOOKUP(C2,$A$2:$B$13,2,0)

Bolted unto your existing function, the above would be:
=N5*24*VLOOKUP(C2,$A$2:$B$13,2,0)
 
Many thanks Max - problem solved.

Max said:
Bolted unto your existing function, the above would be:
=N5*24*VLOOKUP(C2,$A$2:$B$13,2,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top