Solved

VBA - Find all instances of an arrow character

Posted on 2009-04-04
1
556 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

792 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