View Single Post
  #6   Report Post  
Don Guillett
 
Posts: n/a
Default

If you have a list or only one cell this will work. Just highlight the list
and fire this macro. The old lotus EDIT method is NOT necessary. The on
error statement will ignore those with less than 7 to remove.

BTW 7 would also remove the g in the example

Sub delete1st7()
For Each c In Selection
On Error Resume Next
c.value = Right(c, Len(c) - 7)
Next
End Sub

--
Don Guillett
SalesAid Software

"mark h" wrote in message
...
First of all - thank you for your assistance.
how do I move the cursur to the first character on the row
before deleting the seven characters?

ex: abcdefghijklmnopqrstuvwxyz

result should be:

ghijklmnopqrstuvwxyz

As I tried your suggestion, the result was to delete
the alst 7 characters, instead of the first 7.

"Don Guillett" wrote:

{edit}{home}{Del 7}{d}
reads as: open cell in edit mode - move to the home position of the

row -
delete seven characters - move down one line - end macro


activecell=left(activecell,len(activecell)-7))
activecell.offset(1).select
However all of this can be done much quicker for all cells WITHOUT any
selections.

{edit}{L 10}{BS 30}{D}

Don't understand what is happening with the second macro since it

appears to
do nothing

--
Don Guillett
SalesAid Software

"mark h" wrote in message
...
I need to parse/edit one line at a time usng the same one-line macro.

When I
use macro-recorder, it links to the specific cell reference. I need

the
below macros to be free from specific cell references - it needs to

run on
the current cell and move down one row.

{edit}{home}{Del 7}{d}
reads as: open cell in edit mode - move to the home position of the

row -
delete seven characters - move down one line - end macro

and

{edit}{L 10}{BS 30}{D}
reads as: open cell in edit mode - move left 10 characters - backspace

30
characters - move down one line - end macro

Is there a simple macro that can do these?

thanx

Mark