Forum Discussion
Why isn't my vlookup working
You wrote: i have entered this VLOOKUP-
VLOOKUP(A2,Sheet1!$A$2:$G$5200,5,FALSE)
And I see two potential issues for starters, above and beyond what Detlef_Lewin has already identified (via Google).
- Any formula has to begin with the equals sign. Perhaps yours does in fact; but what you shared with us does not.
- The value you are looking up, A2, is also the first reference in the range where the lookup is being performed. That in itself is problematic. It should be something like
=VLOOKUP(A1,Sheet1!$A$2:$G$5200,5,FALSE)
Note: I've changed your first A2 to read A1, but it should be any other cell reference OTHER THAN a cell within the table itself.
And presuming that column A contains Soc Sec No or an employee ID, whatever the reference value is should be that same type of data.
I've attached an example of VLOOKUP just to illustrate. You can change the value in the cell with the light green background, and there are several VLOOKUPs in the yellow cells that reference the table to the right.
- Celi247Dec 20, 2021Copper Contributor
Thank you very much for this thorough explanation. Unfortunately for some reason i cannot understand this. i am using 2 different workbooks. In my first workbook (WB1) i have employee numbers that i can reference in the first column , to the other workbook(WB2). I am looking to input their years of service from WB2 to WB1. That info is only found on the report on WB2. I'm on the 2nd line in WB1 starting with the first employee (in numerical order in column A)... I am inputting the formula in the service years cell E2. I then go to input the VLOOKUP formula , and i click on A2 which starts the first employee and this formula comes up =VLOOKUP( [@employeeID]], worker details'A$3:F$F5199,6, FALSE) i took out hidden columns, that range is the whole other spreadsheet , without the column titles (e.g. Employee ID, name, etc.) and its still not calculating or bringing the data to the other sheet. I'm so lost. What am i doing wrong? Sorry if it does not make sense. I just can't figure it out!
Thanks for all the help!- mathetesDec 20, 2021Silver ContributorI am going to send you (here on this microsoft service) a PM (personal message). If you are willing to do this, you can reply to my PM and attach copies of your spreadsheets. That would NOT be acceptable here on the public boards--too much confidential information--but if you're willing to share it with me (I was director of HR/Payroll database for some of my career, retired now, so I know how important confidentiality is), then I can see and even make a fix to send back to you.
- Celi247Dec 24, 2021Copper ContributorI figured it out. It was under TEXT and not general. I didn't realize it defaulted to that. I really appreciate your help. i may need more in the near future, so stay tuned. :)Thank you kindly!