Inserting a character into a cell that has text.

D

dolivastro

I need to read several cells, and occasionally change some by adding
bullets to make the text clearer. For example, the text in the cell
might read:

There are three items here.
An automobile.
The license.
The owner.

I want to bullet this to read:

There are three items here.
. An automobile.
. The license.
. The owner.

I'd like to double click on the cell, place the cursor where I need it,
and press ctrl-A to add (at the cursor) 5 spaces, a bullet, and 2 more
spaces.

Any ideas?
Dom
 
L

L. Howard Kittle

Something like this perhaps. No need to double click however. Select cell
and hit Ctrl + a.

Sub SpaceBullet()
ActiveCell.FormulaR1C1 = " . " & ActiveCell.Value
End Sub
Assinged the keystroke Ctrl + a

HTH
Regards,
Howard
 
D

dolivastro

That will work only if I want the bullet at the start of the text. But
I want it to appear anywhere I place the cursor. And I may need more
than 1 bullet in the text.

Dom
 
L

L. Howard Kittle

If you have the cursor placed in a cell, it is edit mode and you cannot run
a macro. To run the macro you have to hit Enter to get the cell out of edit
mode but now you are out of the cell. Catch 22!

I have no suggestion, sorry.

Regards,
Howard
 
N

NickHK

As Howard has pointed out, your concept is not workable in Excel.

Automatically you could do something like:
With ActiveCell
.Value = Replace(.Value, vbLf, vbLf & " - ")
End With

If you want the user to be able to select the place etc, you would need to
use a text box and an insewrt button.

NickHK
 
N

NickHK

As Howard has pointed out, your concept is not workable in Excel.

Automatically you could do something like:
With ActiveCell
.Value = Replace(.Value, vbLf, vbLf & " - ")
End With

If you want the user to be able to select the place etc, you would need to
use a text box and an insewrt button.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top