Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to add bullet formatting to excel text

Experts,
I need to reformat my cell content to display with bullets. For
example:
Sentence one [line break]
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
Sentence three

Macro (or simple reformatting?) should run and replace text so that:
- Sentence one [line break]
- Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
- Sentence three

I created a macro that replaces line breaks so that a bullet appears
on the next line but that doesn't really cut it because the first line
is missing the bullet, and any extra lines get a bullet that doesn't
belong.

Sub insertbullets()
For Each c In ActiveCell.CurrentRegion.Cells
c.Value = Application.WorksheetFunction.Substitute(c, Chr(10), Chr(10)
& "-")
Next
End Sub

Any ideas? We are copying over a ton of content from PowerPoint and
need to bring the bullet formatting over with it.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to add bullet formatting to excel text

Whilst you can probably achieve the same with a RegEx, try this:

Private Sub CommandButton1_Click()
Dim AllLines() As String
Dim Counter As Long

AllLines = Split(Range("A1").Value, Chr(10))

For Counter = 0 To UBound(AllLines)
If Len(AllLines(Counter)) 0 Then AllLines(Counter) = "-" &
AllLines(Counter)
Next

Range("A1").Value = Join(AllLines, Chr(10))

End Sub

NickHK

wrote in message
oups.com...
Experts,
I need to reformat my cell content to display with bullets. For
example:
Sentence one [line break]
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
Sentence three

Macro (or simple reformatting?) should run and replace text so that:
- Sentence one [line break]
- Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
- Sentence three

I created a macro that replaces line breaks so that a bullet appears
on the next line but that doesn't really cut it because the first line
is missing the bullet, and any extra lines get a bullet that doesn't
belong.

Sub insertbullets()
For Each c In ActiveCell.CurrentRegion.Cells
c.Value = Application.WorksheetFunction.Substitute(c, Chr(10), Chr(10)
& "-")
Next
End Sub

Any ideas? We are copying over a ton of content from PowerPoint and
need to bring the bullet formatting over with it.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to add bullet formatting to excel text

that did the trick! thanks man!
-Michael

On May 7, 10:08 pm, "NickHK" wrote:
Whilst you can probably achieve the same with a RegEx, try this:

Private Sub CommandButton1_Click()
Dim AllLines() As String
Dim Counter As Long

AllLines = Split(Range("A1").Value, Chr(10))

For Counter = 0 To UBound(AllLines)
If Len(AllLines(Counter)) 0 Then AllLines(Counter) = "-" &
AllLines(Counter)
Next

Range("A1").Value = Join(AllLines, Chr(10))

End Sub

NickHK

wrote in message

oups.com...



Experts,
I need to reformat my cell content to display with bullets. For
example:
Sentence one [line break]
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
Sentence three


Macro (or simple reformatting?) should run and replace text so that:
- Sentence one [line break]
- Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two Sentence two Sentence two
Sentence two Sentence two Sentence two [line break]
[line break]
- Sentence three


I created a macro that replaces line breaks so that a bullet appears
on the next line but that doesn't really cut it because the first line
is missing the bullet, and any extra lines get a bullet that doesn't
belong.


Sub insertbullets()
For Each c In ActiveCell.CurrentRegion.Cells
c.Value = Application.WorksheetFunction.Substitute(c, Chr(10), Chr(10)
& "-")
Next
End Sub


Any ideas? We are copying over a ton of content from PowerPoint and
need to bring the bullet formatting over with it.- Hide quoted text -


- Show quoted text -



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
bullet formatting in a spreadsheet Markie Excel Discussion (Misc queries) 1 March 2nd 10 05:22 AM
Can you use bullet points for text within a cell in Excel? Carolyn Excel Discussion (Misc queries) 1 September 6th 07 05:36 PM
Insert Bullet in E-Mail text Les Stout[_2_] Excel Programming 2 January 19th 07 09:12 AM
Bullet Points in Excel Cretin Excel Discussion (Misc queries) 2 April 5th 05 04:43 PM
how to add bullet list of text items in cell kurb Excel Programming 0 March 29th 05 09:52 PM


All times are GMT +1. The time now is 09:56 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"