ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Need help with setting up IF formula in Excel (https://www.excelbanter.com/links-linking-excel/175372-need-help-setting-up-if-formula-excel.html)

Sharon[_2_]

Need help with setting up IF formula in Excel
 
How can I do this (below) in 2007 Excel?

I have a list of high school course codes for some college classes in
Column D. In column E I would like the NAME of the class, but I do NOT
want to look up all 500 course codes to manually type in the correct
name of the class. (Column A, B, C are used for first, middle, last
name)

So, I'm thinking that there must be a way to put in an IF formula of
some type that say IF the course code is 1001 in columnm D, then in
column E the name will be English 1 (for example). And IF the course
code is 1002, it will read English 2 in column E, etc.

I have about 30 course codes that I need to plug in. All I can think
if of is the IF formula itself must list all 30 course codes. Or
perhaps there is an IF formula tells Excel to check against a list of
course codes in cells XXX that is on a separate worksheet. And
perhaps it is not an IF formula at all, but some other formula.

How do I go about doing this? I am only familiar with basic =SUM
formulas, so detailed directions would be helpful.

Thanks,
Sharon


Bill Manville

Need help with setting up IF formula in Excel
 
Put your 30 course codes in a column
Put the 30 descriptions in the adjacent column to the right.
Say they occupy A1:B30 on sheet named Table.

In column E of your main sheet, for example in row 2, put formula
=VLOOKUP(D2,Table!$A$1:$B$30,2,FALSE)

Copy to the other cells in column E

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


Sharon[_2_]

Need help with setting up IF formula in Excel
 
On Feb 2, 7:51*pm, Bill Manville wrote:
Put your 30 course codes in a column
Put the 30 descriptions in the adjacent column to the right.
Say they occupy A1:B30 on sheet named Table.

In column E of your main sheet, for example in row 2, put formula
=VLOOKUP(D2,Table!$A$1:$B$30,2,FALSE)

Copy to the other cells in column E

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


Thanks so much. I couldn't get it to work at first. I had N/A in the
cells where I pasted the formula (in columm E). But then I clicked on
the words under the formula bar (the words that said table_array) and
then it started working. I'm not sure what that did, but the formula
wouldn't work until I did that. I only used pretend numbers and
courses to try out the formula and so when I get time I'm going to put
it in all the data for the real courses and make sure I can still get
it to work. Thanks again.



All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com