How to do I move data to fit an Excel 2003 spread sheet

I have created a list of all the possible IP numbers for our work network in a column in an excel spreadsheet.

Then I have the output from our DHCP server on another excel sheet, which has the IP, machine name, MAC address etc in separate columns all on the same row.

What I want to do is, using the IP address column from DHCP data as a way to make the assosciation or match, move the data to the corresponding row on the first excel sheet rather than doing it all manually.

Can anyone provide any insight into this? Is this possible with Excel or should I be using something else like Access?

Let me know if havn't explained clearly.

Who is Participating?

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

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.

Rory ArchibaldCommented:
Use a combination of INDEX and MATCH. Assuming IPs in col A on both sheets, then on the first sheet:
B2: =If(ISNA(MATCH(A2,Sheet2!A:A,0)),"",MATCH(A2,Sheet2!A:A,0))
C2: =IF($B2="","",INDEX(Sheet2!B:B,$B2))
and copy across for as many columns of data as you want returned. Then copy the formulas from row 2 down as far as required.


Using VBA macro will do this for you and copy the data across as well. I can't post the code right now but if you upload an example file I'll work on it later today.
You can do that using a VLOOKUP() function like the one on the attached example.


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
The ONLY way to "move the data to the corresponding row on the first excel sheet rather than doing it all manually" as you requested is with a VBA macro... the VLOOKUP does not MOVE data just evaluate a formula.

Let me know if you still want the macro code...
defectaAuthor Commented:
Charltp5: Thats fine, this solution is more than sufficient. thanks anyway.
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.