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?

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.

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...

0

defectaAuthor Commented: 2011-04-06

Charltp5: Thats fine, this solution is more than sufficient. thanks anyway.