Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to write a macro that will append special characters (two en spaces) to the beginning of the text in each highlighted cell. I am new to vba, and I am not having much luck. Does anyone have any ideas or hints for how to do this? Thanks, Dan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dan,
Dan wrote: I'm trying to write a macro that will append special characters (two en spaces) to the beginning of the text in each highlighted cell. I am new to vba, and I am not having much luck. Does anyone have any ideas or hints for how to do this? I don't know the character code for an en space, but here's some code that should do what you're looking for (replace 50 with the character code that corresponds to en space): Public Sub gPrependEmSpaces() Dim c As Range For Each c In Selection If Len(c.Value) 0 And Not c.HasFormula Then c.Value = Chr(50) & Chr(50) & c.Value End If Next c End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and Append Macro | Excel Discussion (Misc queries) | |||
append two worksheets with excel macro | Excel Programming | |||
use macro to append records to worksheet | Excel Programming | |||
macro to append one cell to another | Excel Programming | |||
macro to append one cell to another | Excel Programming |