Excel formula help needed please!

adamhodgkins

New Member
Joined
Feb 22, 2013
Messages
3
Hi all,

I have been given a task to transfer some data from one spreadsheet to another, but I'm struggling to find a formula to help with it...

The data I have to transfer is in the following format:

Server Name</SPAN>IP Address</SPAN>Area</SPAN>
Server A</SPAN>1.1.1.1</SPAN>Production</SPAN>
Server A</SPAN>2.2.2.2</SPAN>Development</SPAN>
Server A</SPAN>3.3.3.3</SPAN>Testing</SPAN>
Server B</SPAN>4.4.4.4</SPAN>Production</SPAN>
Server B</SPAN>5.5.5.5</SPAN>Production</SPAN>
Server B</SPAN>6.6.6.6</SPAN>Testing</SPAN>
Server C</SPAN>7.7.7.7</SPAN>Development</SPAN>
Server C</SPAN>8.8.8.8</SPAN>Testing</SPAN>
Server C</SPAN>9.9.9.9</SPAN>Production</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL span=2></COLGROUP>

The spreadsheet that needs this information adding to is in a different format:

Server Name</SPAN>IP Address 1</SPAN>Area 1</SPAN>IP Address 2</SPAN>Area 2</SPAN>IP Address 3</SPAN>Area 3</SPAN>
Server A</SPAN>1.1.1.1</SPAN>Production</SPAN>2.2.2.2</SPAN>Development</SPAN>3.3.3.3</SPAN>Testing</SPAN>
Server B</SPAN>4.4.4.4</SPAN>Production</SPAN>5.5.5.5</SPAN>Production</SPAN>6.6.6.6</SPAN>Testing</SPAN>
Server C</SPAN>7.7.7.7</SPAN>Development</SPAN>8.8.8.8</SPAN>Testing</SPAN>9.9.9.9</SPAN>Production</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL span=6></COLGROUP>

If it was only a few entries I'd be happy to do it manually, but there are just under 15,000 rows of data that need to be transferred so I'd like to try and automate this if at all possible?

I've tried using VLOOKUP but that will stop when it finds the first instance of 'Server Name' and not capture the other information listed.

Any help with this would be greatly appreciated!

Thanks

Adam
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Do all servers always have 3 IP addresses and areas, or can it differ? Does it have to be formula based or is a macro ok?
 
Upvote 0
Adam,
I've created a converter spreadsheet for you however, I'm blocked from publishing it from my office.
The spreadsheet simply uses Countifs, VLOOKUPS, IFERRORs, and you set the number of IPs (columns) and the formulas do the rest.
All you need to do is 1) paste your data starting in cell C3, 2) Look at Cell C1 for MAX IP addesses on Server and ensure the columns accommodate that many.
3) Copy the formulas in row 5 to as many rows as there is data
4) Auto filter on column G to remove the 'blank' rows and you have what you need.
Before sending, what is the MAX IP addresses on a Server? (so I can setup it up so there is no work for you).
I can send it to you separately and then you cna publish so others can use it, and see the techniques used.
 
Upvote 0
Hi Jubjab,

The servers have between 1 and 20 IP addresses associated with them, it doesn't need to be formula based, if there is a macro way of sorting this out that would be fantastic!

Thanks

Adam
 
Upvote 0
Hi Pat_Mc_64,

Unfortunately due to company rules they will not accept attachments from unknown people...

Is there any chance you could maybe post the formulas in a reply? The max number of IP addresses that a server has is 20, but the majority have 3 or 4.

Thanks

Adam
 
Upvote 0
Note: Formulas from Row 4 and Below are the same so you can copy them down to as many rows as there is data (~1500 you said)

Starting From Row 1 to row 4 (except where you sample data differs I put to row 12 column C,D,E)

Column A
row 1 blank</SPAN>
1</SPAN>
Lookup</SPAN>
=C4&"-"&B4</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Column B
MAX</SPAN>
2</SPAN>
IP Count Helper</SPAN>
=COUNTIF($C$3:C4,C4)</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Column C
=MAX(B:B)</SPAN>
3</SPAN>
Server Name</SPAN>
Server A</SPAN>
Server A</SPAN>
Server A</SPAN>
Server B</SPAN>
Server B</SPAN>
Server B</SPAN>
Server C</SPAN>
Server C</SPAN>
Server C</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

Column D
Setup</SPAN>
4</SPAN>
IP Address</SPAN>
1.1.1.1</SPAN>
2.2.2.2</SPAN>
3.3.3.3</SPAN>
4.4.4.4</SPAN>
5.5.5.5</SPAN>
6.6.6.6</SPAN>
7.7.7.7</SPAN>
8.8.8.8</SPAN>
9.9.9.9</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

Column E
=MAX(H1:EI1)</SPAN>
5</SPAN>
Area</SPAN>
Production</SPAN>
Development</SPAN>
Testing</SPAN>
Production</SPAN>
Production</SPAN>
Testing</SPAN>
Development</SPAN>
Testing</SPAN>
Production</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Column F - BLANK

Column G
Count</SPAN>
Column</SPAN>
Server</SPAN>
=IF(B4=1,C4,"")</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Column H
1</SPAN>
4</SPAN>
=$D$3&" "&H1</SPAN>
=IFERROR(VLOOKUP($G4&"-"&H$1,$A$3:$E$12,H$2,FALSE),"")</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

Column I
1</SPAN>
5</SPAN>
=$E$3&" "&I1</SPAN>

Column J
=H1+1</SPAN>
=$H$2</SPAN>
=$D$3&" "&J1</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

Column K
=I1+1</SPAN>
=$I$2</SPAN>
=$E$3&" "&K1</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Same formula in H4 is used for all the lookup ...


Repeat Column J & K for each additional instance of # of IPs

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top