How do i write logical_test for more than 100 values (IF)

  • Thread starter Thread starter Horani
  • Start date Start date
H

Horani

I would like to use (IF) for more than 100 values "I want to type the
employee number and the logical test to be employee name
 
Hi,

You can't nest id's that deeply so another way is a table like this
Col A Col B
100 aa
101 bb
102 cc
103 dd
104 ee
105 ff
106 gg
107 hh
108 ii
109 jj
110 kk
111 ll

Column A are your ID No's and Column B are names. The formula
=VLOOKUP(C1,A1:B12,2,FALSE)

Looks for the ID No in C1 in Column A and returns the corresponding name
form Column B

Mike
 
Hi

You should not be using IF for that number of tests.
Use Vlookup instead.
With a list of Employee numbers in column A and Employee Names in column B,
and with the Employee number to be looked up in C1, enter in D1
=VLOOKUP(C1,$A:$B,2,0)
and that will return the Employee's name

For more help on Vlookup take a look at
http://www.contextures.com/xlFunctions02.html
 

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