+ Reply to Thread
Results 1 to 21 of 21

Ip range to individual ip address

  1. #1
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    Ip range to individual ip address

    Dear team,
    kindly let me know the formula or a way to convert ip range (x.x.x.1 - x.x.x5) to (x.x.x.1, x.x.x.2, x.x.x.3, x.x.x.4, x.x.x.5)

    Avaialble Data'
    50.75.28.242 - 50.75.28.246


    Expected result'
    50.78.28.242
    50.78.28.243
    50.78.28.244
    50.78.28.245
    50.78.28.246
    Last edited by bharath18091991; 05-31-2018 at 04:27 AM. Reason: Updating more details

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

    Re: Ip range to individual ip address

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    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 results are 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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Ip range to individual ip address

    Deleted post.
    Last edited by kersplash; 05-31-2018 at 04:09 AM.

  4. #4
    Registered User
    Join Date
    02-19-2018
    Location
    Mysore
    MS-Off Ver
    2013
    Posts
    6

    Re: Ip range to individual ip address

    Update expected to view with the example for clarification

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

    Re: Ip range to individual ip address

    See post #2. Thanks.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Ip range to individual ip address

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    Hi,

    If you can separate the "Available data" into 2 cells, may be this will help:

    It's not letting me post "Formulas"

    Will try to upload...
    Last edited by jtakw; 05-31-2018 at 11:54 PM.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Ip range to individual ip address

    I'll repeat from above:

    Attach example EXCEL file (not a picture, pasted text or any other than Excel format!). This file should be attached to a new post. Never change your original post.

    In attached Excel file try not to use:
    • merged cells
    • password protection
    • unnecessary formatting like: colours, borders, aligning another than default, etc...
    • unnecessary zooming/grouping/freezeing
    You have words to logically describe the problem

    To attach an Excel file to your post,
    • desensitize data
    • remeber that your example should reflect structure and type of data and contain the result what you want to achieve (manually created if necessary)
    • click Go Advanced,
    • scroll down until you see Manage Attachments,
    • click that and select Browse,
    • select your file and click Open,
    • click Upload and you will see your attachment below Upload Files from a website
    • click Close this window,
    • click Submit reply

    After that you should see attachment in your post

  9. #9
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    Hi again,

    Continuing from my Post #7.

    D2 formula copied down.
    Attached Files Attached Files

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Ip range to individual ip address

    Quote Originally Posted by jtakw View Post
    Hi,

    If you can separate the "Available data" into 2 cells, may be this will help:

    It's not letting me post "Formulas"

    Will try to upload...
    If your formula contains < or > make sure there is a space either side of them, otherwise the server thinks it is HTML code

  11. #11
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    Thank You Ford, it does have One > (greater than) symbol

    But now I've uploaded the file.

    Nice to hear you're doing well
    Last edited by AliGW; 06-01-2018 at 03:04 AM. Reason: Unnecessary quotation removed.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: Ip range to individual ip address

    It would be helpful to post the formula for those who don't want to have to open the attachment. Thanks.

  13. #13
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    Ok, I won't be quoting ...

    It still won't let me post the formula, possibly there're "at" ( char 64 ) symbols I used in my formula??

    Ok, I've replaced All "at" symbols with "^" just so it would show:

    =IF(COUNTA(D$1:D1)=0,A$2,IF(MID(B$2,FIND("^",SUBSTITUTE(B$2,".","^",3))+1,15)-MID(A$2,FIND("^",SUBSTITUTE(A$2,".","^",3))+1,15)+1>COUNTA(D$1:D1),REPLACE(D1,FIND("^",SUBSTITUTE(D1,".","^",3))+1,15,"")&MIN(MID(B$2,FIND("^",SUBSTITUTE(B$2,".","^",3))+1,15)+0,MID(D1,FIND("^",SUBSTITUTE(D1,".","^",3))+1,15)+1),""))

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Ip range to individual ip address

    testing to see if @ will let me post

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Ip range to individual ip address

    =IF(COUNTA(D$1:D1)=0,A$2,IF(MID(B$2,FIND("@",SUBSTITUTE(B$2,".","@",3))+1,15)-MID(A$2,FIND("^",SUBSTITUTE(A$2,".","@",3))+1,15)+1>COUNTA(D$1:D1),REPLACE(D1,FIND("@",SUBSTITUTE(D1,".","@",3))+1,15,"")&MIN(MID(B$2,FIND("@",SUBSTITUTE(B$2,".","@",3))+1,15)+0,MID(D1,FIND("@",SUBSTITUTE(D1,".","@",3))+1,15)+1),""))

    Trying your formula with @ instead of ^ although you could just as well have used ^

  16. #16
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    I had an unneeded function in my formula, so I'm re-uploading the file and re-posting the formula.

    @Ford, may be it's because I'm new on this forum with posting restrictions...(you missed one of the "^" )
    Looks like I've met my 10 post requirement now....

    =IF(COUNTA(D$1:D1)=0,A$2,IF(MID(B$2,FIND("@",SUBSTITUTE(B$2,".","@",3))+1,15)-MID(A$2,FIND("@",SUBSTITUTE(A$2,".","@",3))+1,15)+1>COUNTA(D$1:D1),REPLACE(D1,FIND("@",SUBSTITUTE(D1,".","@",3))+1,15,"")&MID(D1,FIND("@",SUBSTITUTE(D1,".","@",3))+1,15)+1,""))
    Attached Files Attached Files

  17. #17
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Ip range to individual ip address

    Assuming your data in A2:B2

    Formula in D2:

    =IFERROR(IF(SUBSTITUTE(A$2,".","")+ROWS(D$2:D2)-1<=SUBSTITUTE(B$2,".","")+0,TEXT(SUBSTITUTE(A$2,".","")+ROWS(D$2:D2)-1,"00\.00\.00\.000"),""),"")

    copy down

  18. #18
    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: Ip range to individual ip address

    Try this
    Enter formula in C2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C
    1 Avaialble Data'
    2 50.75.28.242 50.75.28.246 50.75.28.242
    3 50.75.28.243
    4 50.75.28.244
    5 50.75.28.245
    6 50.75.28.246
    7
    Last edited by AlKey; 06-02-2018 at 12:08 PM.
    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

  19. #19
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Ip range to individual ip address

    Hi,

    Formulas provided in Post #17 and #18 will fail for IP addresses that are Not ##.##.##.###

    As IP addresses can be sets of 1 to 3 digits separated by a Period, like:

    #.#.#.#
    #.##.###.###
    #.###.###.###
    ###.#.#.#
    etc., etc.

    The formula I provided in Post #16 will accommodate all possibilities.

  20. #20
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Ip range to individual ip address

    Try this formula in C2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    03-20-2020
    Location
    NYC
    MS-Off Ver
    16.35 Excel for Mac
    Posts
    1

    Re: Ip range to individual ip address

    The above solutions are great but dont work when muitple threads of IP addresses.
    Like: 1.0.206.0 1.0.208.255
    In this case the thrud digits are different
    Can anyone help solving that?

+ 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. Macro To Send Individual sheets To Different Email Address Based On Sheet Name
    By markusvirus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2016, 05:29 PM
  2. Address:= .hyperlinks(1).Address subscript out of range
    By esc952 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2016, 02:16 AM
  3. Replies: 2
    Last Post: 11-07-2014, 06:10 PM
  4. Macro to send individual tabs from a worksheet to different email address based on in
    By mikeyexcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-30-2014, 07:46 PM
  5. [SOLVED] Use address of named range to find same address in another worksheet
    By dwsteyl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2013, 04:56 PM
  6. Replies: 11
    Last Post: 05-26-2013, 07:45 AM
  7. [SOLVED] Query Oracle using range in Excel to return individual records for each cell in range
    By bigwillydier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-18-2013, 06:37 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