populating columns

I have filled out a sample to help better understand what I am trying to accomplish.  I need the "report" sheet to query the test scores for the tst cde listed in the "database" sheet according to the id Num.  So back to my example in the report sheet you will see for ID 229041927 I manually populate the tst score in the respective tst cde that are listed horizontally in row 1 of the "report" sheet this is what I would like a formula written for.

Thanks
book1.xls
wcodyInformation Systems SpecialistAsked:
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.

ProfessorJimJamMicrosoft Excel ExpertCommented:
please find attached solution.
book1.xls
ProfessorJimJamMicrosoft Excel ExpertCommented:
if you want to do it yourself  simply put this formula
=IFERROR(INDEX(DATA!$H$2:$H$717, SMALL(IF(RIGHT($A2,LEN($A2)-2)=DATA!$A$2:$A$717&"", ROW(DATA!$A$2:$A$717)-MIN(ROW(DATA!$A$2:$A$717))+1, ""), COLUMN(A1))),"")

Open in new window

into the D2 and press control shift enter and then copy the formula and paste it in range D2:K163 and that is it.
wcodyInformation Systems SpecialistAuthor Commented:
Perfect thanks!
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

wcodyInformation Systems SpecialistAuthor Commented:
Does the number of digits in the ID column make a difference?  I changed the id number for the sake of privacy when I posted the sheet.  Thought it would just be matter of the ID number matching but when I plug in the actual ID numbers which contain 7 digits the formula stops working.
wcodyInformation Systems SpecialistAuthor Commented:
I also noticed that the test scores are populating in the correct corresponding test column
ProfessorJimJamMicrosoft Excel ExpertCommented:
how does your actual data look like?
wcodyInformation Systems SpecialistAuthor Commented:
The only difference between the actual and the real is the ID numbers (column a) are different they are 7 digits rather than the 11 in the sheet.  I also noticed the tst_score isn't populating in correct column for the tst_cde
ProfessorJimJamMicrosoft Excel ExpertCommented:
can you please explain in layman’s words  

the how many char  is the lookup values which is in REPORT Sheet?  

How many char is the lookup range in DATA sheet?
wcodyInformation Systems SpecialistAuthor Commented:
there will be 7 characters on both, a normal ID # is 9050231.
wcodyInformation Systems SpecialistAuthor Commented:
I see now there is an extra set of 2's added between the sheets.  all the id numbers in the end have just 7 characters, so the section of the formula that is taking 2 away to get them all the same, that can come off.  The id numbers on the final sheet those are all the same format in both the Data and report sheets
wcodyInformation Systems SpecialistAuthor Commented:
I corrected the ID so they have the same number of characters in both sheets & filled in the first entry of report sheet manually so you can see the effect of what I want to happen
Copy-of-book1.xls
ProfessorJimJamMicrosoft Excel ExpertCommented:
Ok.  now, i understood what you were really looking for.   your question wasn't clear at the first time.

please see the attached solution.
Copy-of-book1.xls

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
wcodyInformation Systems SpecialistAuthor Commented:
thanks that works great
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 Excel

From novice to tech pro — start learning today.