View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Format text entries with code - Excel 2007

As long as the cell entries in Column H are text constants, and not the
result of a formula, then you can use this macro to do what you want...

Sub InsertBullets()
Dim X As Long, DataEndRow As Long
Const DataStartRow As Long = 2
Const DataCol As String = "H"
Const SheetName As String = "Sheet2"
With Worksheets(SheetName)
DataEndRow = .Cells(.Rows.Count, DataCol).End(xlUp).Row
For X = DataStartRow To DataEndRow
.Cells(X, DataCol).Value = Chr(159) & " " & .Cells(X, DataCol).Value
.Cells(X, DataCol).Characters(1, 1).Font.Name = "Wingdings"
Next
End With
End Sub

Note: You have to change the example values I used after the equal signs for
the three Const statements in the above code to reflect the actual starting
row for your data, the actual column that the data is in, and the worksheet
name that the data is on.

If you are not familiar with working with macros, do the following... When
on any worksheet, press Alt+F11 which will take you to the VB editor, then
click Insert/Module on the VB editor's menu bar and copy/pasted the above
code into the code window that opened up. Now, back at your worksheet you
want to perform use this macro on, then press Alt+F8 and select
InsertBullets from the list, then click the Run button.

--
Rick (MVP - Excel)


"Marsh" wrote in message
...
Good Morning,
A group of 22 users have asked if it possibe to insert bullets into text
entries in a column, for example column H. Inserting a Symbol is not
convenient. I did a search and found the following answer to this
question
back in Feb 2006,
A simple code line

Set TB = UserForm1.TextBox1
TB.Value= Replace(TB.Value, CHR$(10), "* ")

should do the trick.
I am not a programmer. Could someone please let me know how I can
implement
this into our file
THank you
Marsh