Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
How do I do F2 - home - add 3 spaces and enter.
Don't want it to carry over name I'm editing - each row different |
#2
![]() |
|||
|
|||
![]()
John,
With a formula, for a string in A1: =" " & A1 Copy down to match your cells, then copy / pastespecial values and get rid of your original values. With a macro, select the cells that you want to change, and run this macro Sub Add3Spaces() Dim myCell As Range For Each myCell In Selection myCell.Value = " " & myCell.Value Next myCell End Sub HTH, Bernie MS Excel MVP "John Grossman" wrote in message ... How do I do F2 - home - add 3 spaces and enter. Don't want it to carry over name I'm editing - each row different |
#3
![]() |
|||
|
|||
![]()
Activecell.Value = " " & Activecell.Value
-- HTH RP (remove nothere from the email address if mailing direct) "John Grossman" wrote in message ... How do I do F2 - home - add 3 spaces and enter. Don't want it to carry over name I'm editing - each row different |
#4
![]() |
|||
|
|||
![]()
Assuming you want to pre-pad selected cells with three spaces, try:
Sub padit() Dim r As Range Set r = Selection r.Value = " " & r.Value End Sub -- Gary's Student "John Grossman" wrote: How do I do F2 - home - add 3 spaces and enter. Don't want it to carry over name I'm editing - each row different |
#5
![]() |
|||
|
|||
![]()
Gary's Student,
That code should have given you an error when you tested it on a multi-cell selection. HTH, Bernie MS Excel MVP "Gary's Student" wrote in message ... Assuming you want to pre-pad selected cells with three spaces, try: Sub padit() Dim r As Range Set r = Selection r.Value = " " & r.Value End Sub -- Gary's Student "John Grossman" wrote: How do I do F2 - home - add 3 spaces and enter. Don't want it to carry over name I'm editing - each row different |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recording simple macro | Excel Worksheet Functions | |||
Simple Hyperlink Macro | New Users to Excel | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
Can't get simple macro to run | Excel Worksheet Functions |