Solved

VBA - Find all instances of an arrow character

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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…
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 Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now