Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro assistance?

I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.

Your assistance is most appreciated,
joanietv
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Macro assistance?

joanietv brought next idea :
I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.

Your assistance is most appreciated,
joanietv


You're going to have to provide more info if you expect anyone to be
able to help you with this. For instance...

Where is the data located?
If in a spreadsheet, what is the layout?

Where did the data come from?

Can you post a sample for a couple of topics and their respective
subtopics?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro assistance?

On May 6, 12:29*am, GS wrote:
joanietv brought next idea :

I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.


Your assistance is most appreciated,
joanietv


You're going to have to provide more info if you expect anyone to be
able to help you with this. For instance...

Where is the data located?
* If in a spreadsheet, what is the layout?

Where did the data come from?

Can you post a sample for a couple of topics and their respective
subtopics?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Sorry. Didnt want to get too wordy. Text originally in Word 31 pages
like this:

above-ground caring for children — See Rule 747.4015
accidents: records*— See Subchapter C, Division 2
creating and keeping a written record — See Rules 747.701,
747.705, 747.709
providing a copy to parents — See Rule 747.707
required form — See Rule 747.703
active play
pre-kindergarten — See Rule 747.2507
school-age— See Rule 747.2607
toddlers — See Rule 747.2407
water served after active play — See Rule 747.3101
active play equipment

Tried working on it there, but no luck so I transferred to Excel to
see if idented lines would come into Column B, but all text copies
into Column A. I need to translate the text and then re-alphabetize
according to the new language, but have to be able to separate topics
and subtopics. Maybe place a delimiter at the beginning of indented
lines? But haven't figured out (in Word or Excel) how to do that.

Let me know if you need more info.
joanietv

Does that help?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro assistance?

On May 6, 8:38*am, joanietv wrote:
On May 6, 12:29*am, GS wrote:





joanietv brought next idea :


I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.


Your assistance is most appreciated,
joanietv


You're going to have to provide more info if you expect anyone to be
able to help you with this. For instance...


Where is the data located?
* If in a spreadsheet, what is the layout?


Where did the data come from?


Can you post a sample for a couple of topics and their respective
subtopics?


--
Garry


Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Sorry. Didnt want to get too wordy. Text originally in Word 31 pages
like this:

above-ground caring for children — See Rule 747.4015
accidents: records*— See Subchapter C, Division 2
* * creating and keeping a written record — See Rules 747.701,
747.705, 747.709
* * providing a copy to parents — See Rule 747.707
* * required form — See Rule 747.703
active play
* * pre-kindergarten — See Rule 747.2507
* * school-age— See Rule 747.2607
* * toddlers — See Rule 747.2407
* * water served after active play — See Rule 747.3101
active play equipment

Tried working on it there, but no luck so I transferred to Excel to
see if idented lines would come into Column B, but all text copies
into Column A. I need to translate the text and then re-alphabetize
according to the new language, but have to be able to separate topics
and subtopics. Maybe place a delimiter at the beginning of indented
lines? But haven't figured out (in Word or Excel) how to do that.

Let me know if you need more info.
joanietv

Does that help?- Hide quoted text -

- Show quoted text -


Another detail I just remembered... indented text is formatted in
different "style" than text that is not indented. Possible to insert
delimiter such as "-" at beginning of any text string with that style?
Just a thougt...

Thanks,
joanietv
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Macro assistance?

joanietv has brought this to us :
On May 6, 12:29Â*am, GS wrote:
joanietv brought next idea :

I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.


Your assistance is most appreciated,
joanietv


You're going to have to provide more info if you expect anyone to be
able to help you with this. For instance...

Where is the data located?
Â* If in a spreadsheet, what is the layout?

Where did the data come from?

Can you post a sample for a couple of topics and their respective
subtopics?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Sorry. Didnt want to get too wordy. Text originally in Word 31 pages
like this:

above-ground caring for children €” See Rule 747.4015
accidents: recordsÂ*€” See Subchapter C, Division 2
creating and keeping a written record €” See Rules 747.701,
747.705, 747.709
providing a copy to parents €” See Rule 747.707
required form €” See Rule 747.703
active play
pre-kindergarten €” See Rule 747.2507
school-age€” See Rule 747.2607
toddlers €” See Rule 747.2407
water served after active play €” See Rule 747.3101
active play equipment

Tried working on it there, but no luck so I transferred to Excel to
see if idented lines would come into Column B, but all text copies
into Column A. I need to translate the text and then re-alphabetize
according to the new language, but have to be able to separate topics
and subtopics. Maybe place a delimiter at the beginning of indented
lines? But haven't figured out (in Word or Excel) how to do that.

Let me know if you need more info.
joanietv

Does that help?


You can enter the following formula into ColB for each subtopic. Then
select ColB and copy/paste values. Then clear contents in subtopic
cells in ColA.

=MID(A3,5,LEN(A3))

OR
You can run the following macro for each sheet:

Sub MoveSubtopics()
Dim r As Long, lLastrow As Long
lLastrow = ActiveSheet.UsedRange.Rows.Count
For r = 1 To lLastrow
With Cells(r, "A")
If Asc(Left$(.Value, 1)) = 160 Then _
.Offset(, 1) = Mid$(.Value, 5): .ClearContents
End With
Next 'r
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro assistance?

On May 6, 1:00*pm, GS wrote:
joanietv has brought this to us :





On May 6, 12:29*am, GS wrote:
joanietv brought next idea :


I am working with an index that contains topics and subtopics. I need
to separate the topics and subtopics into column A and B while
retaining their order in terms of row position. No delimiters, only
difference is subtopics are indented by .25". I have very little
experience with macros but tried to record something, but it just
keeps moving the same line over to the next column, doesn't seem to
find specific formatting.


Your assistance is most appreciated,
joanietv


You're going to have to provide more info if you expect anyone to be
able to help you with this. For instance...


Where is the data located?
* If in a spreadsheet, what is the layout?


Where did the data come from?


Can you post a sample for a couple of topics and their respective
subtopics?


--
Garry


Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Sorry. Didnt want to get too wordy. Text originally in Word 31 pages
like this:


above-ground caring for children — See Rule 747.4015
accidents: records*— See Subchapter C, Division 2
* * creating and keeping a written record — See Rules 747.701,
747.705, 747.709
* * providing a copy to parents — See Rule 747.707
* * required form — See Rule 747.703
active play
* * pre-kindergarten — See Rule 747.2507
* * school-age— See Rule 747.2607
* * toddlers — See Rule 747.2407
* * water served after active play — See Rule 747.3101
active play equipment


Tried working on it there, but no luck so I transferred to Excel to
see if idented lines would come into Column B, but all text copies
into Column A. I need to translate the text and then re-alphabetize
according to the new language, but have to be able to separate topics
and subtopics. Maybe place a delimiter at the beginning of indented
lines? But haven't figured out (in Word or Excel) how to do that.


Let me know if you need more info.
joanietv


Does that help?


You can enter the following formula into ColB for each subtopic. Then
select ColB and copy/paste values. Then clear contents in subtopic
cells in ColA.

* =MID(A3,5,LEN(A3))

OR
You can run the following macro for each sheet:

Sub MoveSubtopics()
* Dim r As Long, lLastrow As Long
* lLastrow = ActiveSheet.UsedRange.Rows.Count
* For r = 1 To lLastrow
* * With Cells(r, "A")
* * * If Asc(Left$(.Value, 1)) = 160 Then _
* * * * .Offset(, 1) = Mid$(.Value, 5): .ClearContents
* * End With
* Next 'r
End Sub

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -

- Show quoted text -


Garry,
Thanks for the quick response. I tried running the macro after copying
and pasting one page of index into Excel, but nothing happened. Can
you tell me which of the variables/values I may need to tweak to get
the macro to "see" my text? Maybe the offset is off? Also, can you
tell me what code moves text to column B?
Much appreciated,
jtv
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Macro assistance?

I copied/pasted your sample text into A1, then ran the macro. Result
was all subtopics were copied to ColB and cleared from ColA. Is your
text in ColA?

See below for more comments...

above-ground caring for children €” See Rule 747.4015
accidents: recordsÂ*€” See Subchapter C, Division 2
Â* Â* creating and keeping a written record €” See Rules 747.701,
747.705, 747.709
Â* Â* providing a copy to parents €” See Rule 747.707
Â* Â* required form €” See Rule 747.703
active play
Â* Â* pre-kindergarten €” See Rule 747.2507
Â* Â* school-age€” See Rule 747.2607
Â* Â* toddlers €” See Rule 747.2407
Â* Â* water served after active play €” See Rule 747.3101
active play equipment



You can enter the following formula into ColB for each subtopic. Then
select ColB and copy/paste values. Then clear contents in subtopic
cells in ColA.

Â* =MID(A3,5,LEN(A3))

OR
You can run the following macro for each sheet:

Sub MoveSubtopics()
Â* Dim r As Long, lLastrow As Long
Â* lLastrow = ActiveSheet.UsedRange.Rows.Count
Â* For r = 1 To lLastrow
Â* Â* With Cells(r, "A")

'If a subtopic then move it to ColB, clear ColA
Â* Â* Â* If Asc(Left$(.Value, 1)) = 160 Then _
Â* Â* Â* Â* .Offset(, 1) = Mid$(.Value, 5): .ClearContents
Â* Â* End With
Â* Next 'r
End Sub


--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MACRO assistance MrDave Excel Discussion (Misc queries) 1 August 12th 09 01:10 PM
Macro Assistance [email protected] Excel Programming 1 May 17th 07 09:22 PM
Macro assistance please Walter Cohen Excel Programming 1 March 17th 06 01:51 PM
Macro assistance please - again! No Name Excel Programming 2 February 24th 06 11:34 AM
Macro assistance dthompson Excel Programming 2 July 7th 05 05:07 PM


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"