Excel Macro Editing Cell w/commands

S

stpolo

I'm trying to create a macro, that will edit the cell that I click on,
by going to the begining of the cell contents, deleting the first
character and then jumping down to the cell below it to do the same.
Any help will be greatly appreciated. Thanks.
 
S

Suzette

You will need to start the macro manually BUT you can set it to do it one of
two ways.

If you know how many rows you are doing, use a for-next loop.
If you want it to do it until it encounters a blank cell, use a Do Until
loop.

For the Do Until loop, the code would be:

Dim strData As String
Do Until IsEmpty(ActiveCell)
strData = ActiveCell
ActiveCell = Right(strData, Len(strData) - 1)
ActiveCell.Offset(1, 0).Activate
Loop
 
Top