Solved

VBA - Find all instances of an arrow character

Posted on 2009-04-04
1
558 Views
Last Modified: 2012-05-06
Ok, so I have a document with all of the data stored in one column. It's being copied from another document and the hierarchy of the data is symbolized by a series of spaces and an arrow character. I can't seem to represent this arrow character in VB Editor. What is the easiest way of deleting the spaces and arrows that proceed the company names leaving the names in a sortable list.

                                          ’ Company 1
                                          ’ Company 1
                                   ’ Company 2
                                   ’ Company 2
                            ’ Company 3
                            ’ Company 3
0
Comment
Question by:ThePATMAN26
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
TheSailor earned 500 total points
ID: 24068882
Find the first character that is NOT a space and start reading the name after the next space.
Somehow like this

string s="   * company 1"
integer startread
integer i=1
while i < length( line )
 if mid( s, i, 1)<>" " then
  startread = i+2
  i=999
 end
end
print mid( s, startread, 999)
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question