You are here:

Excel/Lookup Function/Excel


I work at a school that uses an Excel database to maintain which students have earned a GED. I wrote a function (using Lookup) for the teachers to use to see if any of their students have their GED. Basically - the teacher enters Student ID number and the Lookup retrieves either the GED information or a nothing/blank. If nothing is found it is because the student hasn't been entered into the database by me or the student hasn't yet received their GED.

The problem is: If the student hasn't been entered into the database yet, the Lookup function is returning as a result either the closest match or some name from the database.

I need it to return "Nothing" so I can have it say "No match found" or "Student not it database." Otherwise it looks like - since we are using only Student Id numbers - that a student got his GED.

Thank you so much.

Hello Rey,

Thank you for your question.  Before I can provide you with a specific answer, I need some additional information.  

However, since your lookup formula is not returning an exact match if the ID is not found.  In that case, your formula needs to end with a zero, to tell Excel that you are looking for an exact match instead of an approximate match.

I really need more information before providing an exact solution.

Are all the student ID numbers listed in your data base?  If not, then a lookup formula will not work, you will probably need a VBA solution.  It is possible an IF statement could be combined with a lookup formula to see if the student ID is contained in your database, and if so, return either "GED" or "Nothing" but it would return an error message if the student ID is not in the database.

I would almost need to see your spreadsheet in order to write the formula.

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


David W. Cofer


I can answer MS Excel questions regarding Excel Formulas, Functions, Worksheets, Data Validation, Conditional Formating, Lookup, Pivot Tables and Logic Functions, as well as other general Excel questions. I do not answer questions regarding Charts, Macros, Visual Basic or Programming. Please include the version of Excel you are using. That helps me provide an answer that will work on your system. Also, do not submit duplicate questions to several experts at the same time. If several of us are answering the same question at the same time, it is a waste of time and resources. If the first expert you ask does not provide an acceptable answer, then ask a second expert. As we are volunteers, our time is valuable, and it is a waste of time for 5 of us to be working on the same question at the same time. Thanks for your understanding.


I have used MS Excel for over 20 years and am familiar with all versions back to 1993. I currently use Excel 2013 and assist those using versions going back to 2000. I use Excel extensively at both work and home.

I hold a B.A. degree in Psychology.

©2016 All rights reserved.