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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top