+ Reply to Thread
Results 1 to 4 of 4

Need help with an Excel function for a Juniper firewall

  1. #1
    Registered User
    Join Date
    05-27-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    7

    Thumbs up Need help with an Excel function for a Juniper firewall

    Hi,
    I am not an extensive excel user which is why I am here. I need help with a function.

    Here is an example of the data I have in A2
    set service "XD Port 1" + udp src-port 0-65535 dst-port 138-138

    I added the function =REPLACE(A2,13,1,"""source ") so I get

    set service "source XD Port 1" + udp src-port 0-65535 dst-port 138-138

    I would like to transpose the 0-65535 and the 138-138 so I end up with

    set service "source XD Port 1" + udp src-port 138-138 dst-port 0-65535

    All the lines I have look similar. The 0-65535 and the 138-138 (or whatever number) are always preceded by src-port and dst-port so I was trying to do a search for that text and then do a copy and paste or something like that.

    Thanks for any help.
    Last edited by Charon_; 05-27-2009 at 06:17 PM. Reason: solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Need help with a function for a firewall

    Try this formula:

    Please Login or Register  to view this content.
    it incorporates already your REPLACE formula.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-27-2009
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Need help with a function for a firewall

    Looks like that worked. Thank you.

    You know of an easy way to apply the function to the other cells without editing the function in each each cell and replacing A2 with A3 and A4 and so on?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Need help with an Excel function for a Juniper firewall

    Just copy (fill) the formula down the column.

    Select the cell that now has the formula in it. Click and hold the little black box at the bottom right corner of the cell and drag down the column as far as necessary.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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