Set range in table cell (5,2) using VBA


A

AndreasHermle

Dear Experts:

I would like to achieve the following using VBA:

Insert the Contents of the clipboard (it is a 10 digit number) into
cell (5,2) of the currently selected table.

This cell already contains a lot of words/characters/numbers/fields
therefore ....
.... the range in this cell (5,2) should first move from the very
beginning till the first occurrence of the character 'P' ...
and then move back 10 characters from there, ....
then the range should start anew, and the following 12 characters
should be selected and deleted.

Then the clipboard is to be emptied at the insertion point.

I hope I could make myself clear.

Thank you very much in advance for your kind help.

Regards, Andreas

Dim cel As Cell
Selection.Tables(1).Select
Set cel = Selection.Tables(1).Cell(5, 2)
.........
End Sub
 
Ad

Advertisements


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