+ Reply to Thread
Results 1 to 18 of 18

Help me to use Substr function in Excel

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Help me to use Substr function in Excel

    Hello,

    I am working on extracting data from a database using VBA.

    I now need to make few calculations on the data obtained. i.e i have created a new column whose data is based on this formula ----------> Substr ( Fullname, 0, Instr ( Fullname, "/", 0, 4 ) )

    where Fullname has the value ----> /10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01/

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    What you are trying to get from this?

    10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01/


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    /10000000_IT/10300000_Network/10304000_Bundle/

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Sorry unable to follow because your expected output is not present in the source text. Please clarify

  5. #5
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    the database has some oracle query and they are using this "Substr ( Fullname, 0, Instr ( Fullname, "/", 0, 4 ) )" to arrive this data... now i am trying to develop a macro for this... i managed to get the data but couldn't crack this function/

  6. #6
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    Hello, it seems i am not very clear...

    All i need is i need to extract "/10000000_IT/10300000_Network/10304000_Bundle/" from "10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01/" in excel...

    i think i have to use MID.. can you help me to formulate?

  7. #7
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    From "10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01/" i want to extract the data from the starting position until the 4th occurence of "/"

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Quote Originally Posted by SriramDorai View Post
    All i need is i need to
    extract "/10000000_IT/10300000_Network/10304000_Bundle/"
    from "10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01/"
    Still I am unclear from where you are getting this (10300000_Network/10304000_Bundle)

  9. #9
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    OK, ill change the data..

    From "/10000000_IT/10300000_Network/10304000_Bundle/10304042_Appliance/UTM-1 574 Appliance (CPAP-SG574) v1.00/"
    i want "/10000000_IT/10300000_Network/10304000_Bundle/" hope i am clear now..!

    can i use MID ( I3, 0, Instr ( I3, "/", 0, 4 ) ) column 'I3' has the original data

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Try this...

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    whoa! too good i thought of using MID ..thanks for your time expert!

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Glad it helps you and thanks for the feedback

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

  13. #13
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    Hello,

    Can you help me to solve this one too...

    From : /10000000_IT/10300000_Network/10304000_Bundle/10304037_Switch/NGDC-HP E6600--v1.02Batch/

    i need : Network alone

  14. #14
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    am i clear?

    string 1 = "/10000000_IT/10300000_Network/10304000_Bundle/10304037_Switch/NGDC-HP E6600--v1.02Batch/"
    string to extract : "Network"

    string 2 ="/10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01//"
    string to extract: "Video Conferencing"

    in short i want to extract the data between '_' and '/'

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Try this...

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    am i clear?

    string 1 = "/10000000_IT/10300000_Network/10304000_Bundle/10304037_Switch/NGDC-HP E6600--v1.02Batch/"
    string to extract : "Network"

    string 2 ="/10000000_IT/10340000_Video Conferencing/10344000_Bundle/10344045_VC Appliance/Polycom 2200-76300-650-- v1.01//"
    string to extract: "Video Conferencing"

    in short i want to extract the data between '_' and '/'

  17. #17
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Help me to use Substr function in Excel

    Thanks brother! its working.

  18. #18
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help me to use Substr function in Excel

    Thanks for the feedback once again

+ 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: 1
    Last Post: 03-21-2012, 11:22 AM
  2. Replies: 2
    Last Post: 03-30-2009, 04:04 AM
  3. New Function in Excel 2007 - IFERROR Function
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-15-2007, 05:09 AM
  4. Javascript function converting to Excel function
    By kamila in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2007, 07:06 AM
  5. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 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