+ Reply to Thread
Results 1 to 2 of 2

InStr function to find nth position of a space in a string

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    InStr function to find nth position of a space in a string

    Hi,

    I wrote a function in a macro which should find the position of the first space (" ") from the 8th character onwards in each cell in a column.
    For each value i get a result 0. What am i doing wrong?

    Any input is much appreciated!

    Please Login or Register  to view this content.
    Last edited by MaartenRo; 07-06-2020 at 01:55 AM.

  2. #2
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: InStr function to find nth position of a space in a string

    I figured it out. The right way to do it is:

    Please Login or Register  to view this content.
    By entering "C" as range to be searched in the code executes the funcion foreach cell in the selected range

+ 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. Find position of blank space
    By momakid in forum Excel General
    Replies: 2
    Last Post: 04-11-2020, 11:40 AM
  2. [SOLVED] Does not cosistantly find a text string using "InStr" function
    By Bobbbo in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-21-2016, 08:37 PM
  3. [SOLVED] Match string Array with InStr function
    By jquintana83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2014, 01:48 AM
  4. Instr Function - Replace String 2 with Variables?
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-08-2010, 03:14 PM
  5. using instr() method to find an alphabet character in a string
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2007, 12:20 AM
  6. Defining string using InStr function help
    By Iwant2learn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2006, 12:29 PM
  7. Find number of spaces in a string (instr)
    By DejaVu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-12-2005, 09:26 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