+ Reply to Thread
Results 1 to 2 of 2

InStr Function: Can it evaluate strings in a cell?

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    India
    MS-Off Ver
    Office 2010, 2019
    Posts
    79

    InStr Function: Can it evaluate strings in a cell?

    The code below returns the value of 9.

    Please Login or Register  to view this content.
    Now let's assume that "XXX-EUR Recharge 999" resides in cell C4. Is there a way to write the code so that InStr evaluates the string in this cell?

    I've tried:

    recharge_start = InStr(C4, "Recharge")
    recharge_start = InStr("C4", "Recharge")
    recharge_start = InStr("C" & count, "Recharge")
    recharge_start = InStr(Range("C4").Value, "Recharge")

    None of these work. If the InStr function cannot do this, is there another function that can do the trick?

    The attached file is irrelevant. It related to a more complex question and unfortunately I don't know how to delete it from this post. Please disregard it.
    Attached Files Attached Files
    Last edited by WmBarth; 01-16-2014 at 12:26 AM. Reason: Original Post too complex

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Extract Substring from String

    Welcome to the forum.

    We'd like to help you but first..

    Pls take some minutes to read forum rules and specially-in this case- rule#3
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. [SOLVED] Extract a substring with find and mid
    By AlexRoberts in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-08-2013, 04:02 AM
  2. Extract variable length substring from a string
    By charron9 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2013, 11:52 AM
  3. [SOLVED] extract from string whole word(s) containing substring
    By Bearpecs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2012, 10:37 AM
  4. [SOLVED] Extract Substring, then Ignore that Substring, while collecting data from Other substrings
    By Sameki121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2012, 05:21 PM
  5. Extract a substring with formula
    By bobwachs in forum Excel General
    Replies: 2
    Last Post: 09-10-2010, 04:47 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