Select and input data from a list

H

highway

I'm trying to use an array to select and use specific data from a list.

The data range is 4 coloumns like: Name , Department, City, Salary

On another worksheet I have a drop down to select a a name from the Name
cloumn, and an array formulas in the following 3 coloumns to select
corresponding value for this specific employee:

Department: {=IF(E4=Employees,Department,"Unknown")}
City:{ =IF(E4=Employees,Office,"Unknown")}
Salary: {=IF(E4=Employees,Salary,"Unknown")}

*Employees, Office, Department, Salary are all names of corresponding ranges.

So the problem is that all the arrays work only with the first line in each
coloumn. So that I'm only able to make Excel feed in the required data for
the very first employee in the list. I can select the names of other
emplyees, but only FALSE condition is shown for them.

Does anyone have a solution?

Thank you for help.
 
L

Luke M

I think the problem is your treating your function as both a single line and
an array.
By saying "Unknown" as your false condition, your formula returns something
like
Unknown;
Unknown;
Statement;
Unknown;
....etc

Then, the function closes, and nothing tells XL what to do with all those
values, so it simply takes the first one ("Unknown").

Instead of using an array IF statement, it might be better to just use a
VLOOKUP function. Remeber to include a FALSE value for the range_lookup
variable. If a value isn't found, this will return the #VALUE error. Could
modify entire formula then to:
=IF(ISERROR(VLOOKUP(formula)),"Unknown",VLOOKUP(formula))
 

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

Top