+ Reply to Thread
Results 1 to 4 of 4

FIND REPLACE SUBSTITUTE I am not sure which one please help

  1. #1
    Registered User
    Join Date
    02-28-2018
    Location
    England
    MS-Off Ver
    Office 2010
    Posts
    2

    FIND REPLACE SUBSTITUTE I am not sure which one please help

    Hi,

    Hoping i might be able to get some assistance here, I have been googling most of the evening and am not able to find the answer to solve my issue.

    In my spreadsheet i have a column of data in column B in sheet two which contains IP subnet addresses and names as follows

    B4:192.168.1.0/24 C4:Zone1
    B5:192.168.2.0/24 C5:Zone2
    B6:192.168.3.0/24 C6:Zone3
    B7:192.168.4.0/24 C7:Zone4
    ....etc

    And on sheet 1 i have a column of cells that contain entries inputed by the user like below
    192.168.1.5
    192.168.3.10
    192.168.4.155

    So far i have managed to write a vlookup function that looks up the user inputed cell and matches the entry on sheet 2 and displays the zone info. however this only works when i enter an exact match i.e. 192.168.1.0/24.

    I need to be able to match on the first three numbers and disregard the last bit.

    This is what i have so far =VLOOKUP(I9,'IP-Lookup'!B:C,2,0)

    I cannot figure out this part and its driving me nuts, anyone have any ideas.

    Thanks very much hope this all makes sense.

    Cheers

    Neil

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: FIND REPLACE SUBSTITUTE I am not sure which one please help

    Are you expecting a unique result, or can there be more than one? If there are more than one, do you want to return the first result, all of them, or what?
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    02-28-2018
    Location
    England
    MS-Off Ver
    Office 2010
    Posts
    2
    Quote Originally Posted by ben_hensel View Post
    Are you expecting a unique result, or can there be more than one? If there are more than one, do you want to return the first result, all of them, or what?
    Hi Ben,

    Yes the result from the look up should only ever be unique.

    Thanks

    Neil

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: FIND REPLACE SUBSTITUTE I am not sure which one please help

    In that case it's pretty straightforward.

    Please Login or Register  to view this content.
    That's an array formula, so confirm with CTRL+SHIFT+ENTER, not just ENTER key.

    Note that this searches the first nine characters, not the first three period-separated values; there's no difference based on the example data that I can see, but it's a faster & simpler operation that hunting out the fourth period and cutting off from there forward.

+ 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. Replace/Substitute Function
    By tushararora in forum Excel General
    Replies: 3
    Last Post: 09-10-2015, 01:14 AM
  2. [SOLVED] Tricky SUBSTITUTE or REPLACE
    By bibu in forum Excel General
    Replies: 7
    Last Post: 03-16-2014, 01:38 PM
  3. [SOLVED] substitute/replace until
    By JanRaven in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-02-2012, 12:03 PM
  4. Substitute, Find or Replace? Need Advice
    By meyero90 in forum Excel General
    Replies: 1
    Last Post: 06-18-2010, 09:24 PM
  5. Replace or substitute formula maybe? Not sure what one to use?
    By essexpoker in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2008, 11:25 AM
  6. [SOLVED] [SOLVED] Replace/substitute
    By Viktor Ygdorff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2006, 09:40 AM
  7. [SOLVED] Substitute/Replace
    By Viktor Ygdorff in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-17-2006, 07:40 AM

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