title: Getting index number of first word of row obtained from paragraph in VBA
body: <p>I'm trying to obtain a column that will contain the index number of first word from the referenced column cell by cell.</p>
  
  <p>I am able to get the length of word in a text, for upper cell value in have used <code>ActiveCell.Offset(-1, 0).Activate</code> but it does not work for me.</p>
  
  <pre><code>Public Function StartIndex(ByVal strText As String) As Long
  
      Application.Volatile
      Length = UBound(Split(strText, " ")) + 1
      StartIndex = ActiveCell.Offset(-1, 0).Activate + Length
  
  End Function
  </code></pre>
  
  <p>look below, consider I'm having <strong>col1</strong> by default and want <strong>startIndex</strong> through VBA;</p>
  
  <pre><code>      Col1                           |   startIndex        
  VBA Index Printer Friendly version   |         1            
   Adobe Acrobat version               |         6          
  A UDF can remain in a code module    |         9          
  </code></pre>
  
  <p>as shown above consider the table have 3 rows and two columns,the index number of word <strong>"VBA"**in col1 row1 is 1 similarly word **"is"</strong> next to word <strong>"VBA"</strong> have an index of 2, and so on .. Consider the rows are a combination of a paragraph and so when we reach Col1 row2 the index of word <strong>"Adobe"</strong> should be 6 as shown in table</p>
  
  <p>Actually startIndex column shows the index number of the first word from the paragraph which is divided in rows</p>