Copying part of a cell

  • Thread starter Thread starter David
  • Start date Start date
D

David

can you copy part of a cell, ie i want to take the first 8 characters of a
cell and copy into another cell
thanks
David
 
If you really wanted to copy the first 8 characters...

You can select the cell.
Hit F2 (to go into edit mode)
Select the first 8 characters (in the formula bar)
Rightclick|Copy (or hit ctrl-c)
Hit escape to leave edit mode.

And paste into the receiving cell (or even in the formula bar if you want).
 
Assuming cell A1 is the source - select the target cell and run this tiny
Macro.
------------------------------------------
Sub Copy_First_8_Characters()
ActiveCell = Left([A1], 8)
End Sub
------------
If you care to take control over the Source cell via code whie the target
cell remains the selected cell - you can try this one:
Sub Copy_First_8_Characters()
ActiveCell = Left([A1], 8)
End Sub
 
And if want to make more flexible/convenient - by clicking the Source cell
with the mouse - try this:
-------------------------------------------
Sub Copy_First_8_Characters()
Selection = Left(Application.InputBox("CLICK on the Source Cell",
"Select Source", Type:=8), 8)
End Sub
---------------
Micky


מיכ×ל (מיקי) ×בידן said:
Assuming cell A1 is the source - select the target cell and run this tiny
Macro.
------------------------------------------
Sub Copy_First_8_Characters()
ActiveCell = Left([A1], 8)
End Sub
------------
If you care to take control over the Source cell via code whie the target
cell remains the selected cell - you can try this one:
Sub Copy_First_8_Characters()
ActiveCell = Left([A1], 8)
End Sub
-----------------
Micky


David said:
can you copy part of a cell, ie i want to take the first 8 characters of a
cell and copy into another cell
thanks
David
 
Back
Top