+ Reply to Thread
Results 1 to 17 of 17

Search for IP address in one column then pull it out and populate another column

  1. #1
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Search for IP address in one column then pull it out and populate another column

    I have an Excel file where one column contains an extended amount of information which includes an IP address. The IP address always starts with "10" but after that it may have 2 or 3 numbers in each remaining octet. For example........ 10.50.220.5 or 10.215.20.200 etc.

    I would like to be able to locate the IP address in this column for each row and then pull it out and populate another column. This way I can now sort on the new IP address column and do other things with this information.

    This is beyond my Excel knowledge and I don't really have time to research how to do this for days on end.

    I am asking for assistance, at least enough so I don't have to spend hours researching how to do this. A nudge in the right direction would help.

    Thank you for your time.
    Attached Files Attached Files
    Last edited by stateworker; 04-05-2017 at 09:37 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    Welcome to the forum!

    The quickest way to get help is to attach a sample Excel workbook (NOT a picture of one).

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    Thank you for the info. I attached an example to my posting.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    You said this:

    I have an Excel file where one column contains an extended amount of information which includes an IP address.
    However, cell B2 in your sample file (which really needs to have some more sample data added - at least 10 rows) has no IP address. Where there is an IP address, is it always preceded by the text string 'IP Address: '?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    This MIGHT do it, but with only one row of relevant sample data in your sample file, it probably won't!

    =TRIM(MID(A1,FIND("10.",A1),15))

  6. #6
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    I have posted a new example with one column showing the type of data I am working with and the "B" column showing what I ultimately want to extract. Thanks for your guidance.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    Was the formula in post #5 any good?

    When I asked for more data, there was a reason for it. The same data ten times doesn't help, because it doesn't test my formula for different scenarios. What I wanted was ten different sets of data, but all in one format or other found in your real data. Do you understand this?
    Last edited by AliGW; 04-05-2017 at 09:42 AM.

  8. #8
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    Nice, that works so now I will just try to duplicate this logic for each row. I really appreciate your help....

  9. #9
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    Yep, I used 3 different sets of data for the first 3 rows then duplicated the 1st row data again for the remaining rows, figuring this would be an okay test.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    OK, well my formula works on the sample ... Have you tried it yet on the real data?

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    Quote Originally Posted by stateworker View Post
    Nice, that works so now I will just try to duplicate this logic for each row. I really appreciate your help....
    You don't need to! Just paste the formula into B2 and drag copy it down. Do you know how to drag copy a cell's contents?

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Search for IP address in one column then pull it out and populate another column

    Enter formula in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  13. #13
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    Yep, I will try this shortly. I just have to address another quick issue before I hop back on this. Once again, I can't thank you enough for your help. This will save me a lot of time researching and fumbling through doing it from scratch.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    You're welcome! Let me know how you get on.

  15. #15
    Registered User
    Join Date
    04-05-2017
    Location
    U.S.
    MS-Off Ver
    2013
    Posts
    7

    Re: Search for IP address in one column then pull it out and populate another column

    Works well for what I need. I am going to tweak it as most of the IP addresses start with 10 but I see I have a few that start with a different set of 3 digits...... not a big deal as these are a minority of IP addresses so I can either tweak this to find them or simply look at them manually. Once again, thank you so much for helping me today. Have a great day!

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    In that case, try AlKey's suggestion above.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,371

    Re: Search for IP address in one column then pull it out and populate another column

    And if that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Look up date, pull result from another column, and populate it in another sheet?
    By AmyV1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-25-2017, 12:28 AM
  2. [SOLVED] pull email address from a column based on criteria from another column
    By cinstanl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2016, 08:09 AM
  3. [SOLVED] Dynamic search; using column # result to determine column used for column/row match.
    By David Brunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2014, 09:57 PM
  4. Search keyword in diff sheet and populate new column
    By sarat47 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2013, 01:23 PM
  5. [SOLVED] Search row and pull column number involving seperate sheets
    By Jon.R in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2013, 04:41 PM
  6. Ping Host Name Column A IP address Result column B Response time Column c
    By NickMac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-13-2012, 03:23 AM
  7. Replies: 3
    Last Post: 07-27-2011, 02:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1