Solved

VBA - Find all instances of an arrow character

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

733 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