Error in VLookup

I am trying to create a summary report in sheet2. When i enter the employee code it automatically fill the rest of the values from sheet1. But getting error in vlookup. Need help
screenshot4.PNGscreenshot3.PNGSmryRpt.xlsx
mustish1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
=VLOOKUP($G$2,Sheet1!A:B,2,0)
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Try this formula...

In D4
=IFERROR(VLOOKUP($G$2,Sheet1!A:I,2,0),"")

Open in new window

In other cells, use the same formula but change the col_index_num (2 in the above formula) as per the column you want to return the value from.

For details, refer to the attached and input Employee Code in G2, that will populate all the cells with the corresponding values if the Employee Code is found on Sheet1 in Column A.
SmryRpt.xlsx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OddyWriterMr.Commented:
You have to change $c$2 in your vlookup formula.

You can see example in this attached file.
SmryRpt.xlsx
mustish1Author Commented:
Thank You.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
The $ sign is making the G2 as an absolute reference. But as per your existing layout you can remove the $ sign from G2.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.