Should I be using VLOOKUP and if so, how in this case?

  • Thread starter Thread starter Helene
  • Start date Start date
H

Helene

This is surely simple, yet I am not getting it right.

I want to enter in a three letter code, and with each code is a value.
For example if I enter in IMM into colum D6, the value will be .45 i
F6. IF enter in CRE, in Column D7 the Value for this code is .85 i
F7. I want thiese value to be entered automaticaly each time I ente
in a code.

I will have about 10-15 different codes, each with a correspondin
value.

I thought to create a table of the codes and values on another sheet i
this workbook and use VLOOKUP.

Is that the thing to do? If so, how will the code work.

Please keep this quite simple as I have little Excel background and N
programming knowledge.

And thanks so much for any help
 
Helene,

VLOOKUP will do it.

On Sheet 2 say, enter the codes in A1:A15. Enter the values in B1:B15. For
example,
Sheet2!A1: IMM
Sheet2!B1: .45
etc.

in F5, add the formula

=VLOOKUP(D6,Sheet2!A1:B15,2,FALSE)

and copy this formula down to Fn.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Bob, Thanks. It worked just fine. I tested it withall codes. However
it is working only in the initial cell.

When I copy the forumla down I get a #NA in the following cells.

In the succceeding cell where I get the #NA message, the formula reads
=VLOOKUP(D4,Fees!A2:B5,2,FALSE)

I Changed the start formula to absolute values

=VLOOKUP(D3,Fees!$A1:$B4,2,FALSE) and while that still works in th
first cell, I have the same problem when copying it down.

(So I changed it back to the formula you gave me here.)

Thanks for your help on this
 
Bob, Thanks. It worked just fine. I tested it withall codes. However,
it is working only in the initial cell.

When I copy the forumla down I get a #NA in the following cells.

In the succceeding cell where I get the #NA message, the formula reads:
=VLOOKUP(D4,Fees!A2:B5,2,FALSE)

I Changed the start formula to absolute values

=VLOOKUP(D3,Fees!$A1:$B4,2,FALSE) and while that still works in the
first cell, I have the same problem when copying it down.

(So I changed it back to the formula you gave me here.)

Thanks for your help on this.

One reason to get the #NA message is that the code referenced by D4 is not in
the referenced range.

Perhaps instead of

=VLOOKUP(D3,Fees!$A1:$B4,2,FALSE)

you should use:

=VLOOKUP(D3,Fees!$A$1:$B$4,2,FALSE)


--ron
 

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