+ Reply to Thread
Results 1 to 6 of 6

Which formula to use and how

  1. #1
    Registered User
    Join Date
    06-18-2019
    Location
    PA
    MS-Off Ver
    O365 Plus 2016
    Posts
    3

    Which formula to use and how

    I manage excel workbooks regarding our networks.
    The lists all the devices that are connected to what ports on the switches and in what VLANs they are in.

    I am trying to automate the bottom section of the worksheet, labeled "SHOW VLAN".
    If you run this command on a switch, it will give me the data I want.
    But when you paste it into a text document, then import into Excel, it gets sloppy. The data gets chopped off.
    Also, it means you'd have to run the command, export, and import EVERY TIME there is a change.
    So i figure it's better to automate it from the data already given.

    I've tried VLOOKUP, VLOOKUP RANGE, INDEX, MATCH.
    They all give me errors.
    I am either not using it correctly and/or using the wrong function.
    I've done much research on google and youtube.

    Here's what I need to accomplish...
    Given the data from Column E, I need to return the MULTIPLE values of data in Column C.
    Example, under the 1st Row of "SHOW VLAN" section, you see "1" and "Default" as the 1st VLAN.
    The value returned needs to specify the MULTIPLE ports that are in VLAN "1".
    Therefore, it should return ports "1/0/14" & "1/0/15" in my attached example.

    How can I accomplish this?
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Which formula to use and how

    B39 formula:

    Please Login or Register  to view this content.
    C39 formula:

    Please Login or Register  to view this content.
    Enter this one with Ctrl+Shift+Enter to create an array formula. Now copy the formula across to D39:H39. Then copy the formulas from B39:H39 to B41:H41, B43:H43, B45:H45 etc.

    See attached.

    WBD
    Attached Files Attached Files
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    06-18-2019
    Location
    PA
    MS-Off Ver
    O365 Plus 2016
    Posts
    3

    Re: Which formula to use and how

    Thanks for the help!
    Off to a good start, but the data in "Dept/User" column is not always going to match the VLAN Name.

    See my new attachment (Port 16) as an example.
    Let's say the connection is located in the "Gym", but the person using this line is still part of "Staff".

    I would want them to still show up under the "Staff" VLAN.
    The words "Staff", "wap", "printer", etc. at bottom of sheet would be manually entered.

    is there a way I can use just C39 formula without referencing the B39 formula?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-18-2019
    Location
    PA
    MS-Off Ver
    O365 Plus 2016
    Posts
    3

    Re: Which formula to use and how

    OR I could just reference the value in Column E instead of the value in Column B.
    That way it will always stay the same.

    Just to clean things up a bit, is there any way to have it automatically put the returned values on multiple Rows instead of just 1 row??
    Lets say 5 or 10 ports per row. That would look a bit more organized.

  5. #5
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Which formula to use and how

    C39:

    Please Login or Register  to view this content.
    Enter as an array formula using Ctrl+Shift+Enter then copy the formula to D39:F39.

    C40:

    Please Login or Register  to view this content.
    Again, enter as an array formula then copy across to D40:F40. Now copy C39:F40 and paste into C41, C43 and C45.

    WBD

  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: Which formula to use and how

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

+ 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. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  5. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  6. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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