Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The latest version uses a variable for the text in the cell to left of the
active cell-: Dim LocTxt As String With ActiveCell LocTxt = .Offset(0, -1).Value .Value = Right(LocTxt, 3) .Offset(0, -1).Value = Left(LocTxt, Len(LocTxt) - 3) End With ActiveCell.Offset(1, 0).Activate But I would like to know how to stop the error checking for Number as Text in the active cell. "Stephen_Ford net" <stephen_fordNO@SPAMuwclub<dot wrote in message ... Yes, I think that's it. I'll check... back soon. "Rick Rothstein" wrote in message ... I'm not sure if I completely understand your question... does this code do what you want? With ActiveCell .Offset(0, -1).Value = Left(.Value, Len(.Value) - 3) .Value = Right(.Value, 3) End With -- Rick (MVP - Excel) "Stephen Ford" wrote in message ... I need some VB to do the following please (My VB is not good enough yet) Starting from the active cell (call it the StartCell) In the cell to the left.. ThreeChars = Value.right(3) (the last three chars) Value = Value - last three characters (assume value is text & at least 3 chars present) In StartCell.. value = ThreeChars (as text, overwrite any contents of StartCell) move active cell one down from StartCell |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB Code not grabbing cell values | Excel Discussion (Misc queries) | |||
How to edit the code to fit image within specific cell? | Excel Programming | |||
Code to do edit checks when user moves out of a cell | Excel Programming | |||
Have code check cell contents on edit. | Excel Worksheet Functions | |||
UDF code to find specific text in cell comments, then average cell values | Excel Programming |