Wednesday, May 30, 2007

Vertical Cutting and Pasting-Howto

If you want to cut or paste vertically in a word file this post explains how to do it. First of all lets see what vertical cutting means. Consider the following example,

You have a set of names, say

Alexander Fleming

Alexander the great

Alexander Graham Bell

Cutting vertically

You want to cut out only the second part of the name. But you don’t want to delete all the “Alexander’s”. Just use the Replace all function of word to replace “Alexander” with “Alexander^t”. The “^t” is the character for a tab. Now copy the entire list into an excel sheet. The first part and second part of the name are separated into two different columns.

Pasting vertically

You have a set of conditional statements and you want to add the word “for” in front of each of the conditions. Create a column with the word “for” in each row using excel. Paste the list of conditions on the column next to it. Copy both the columns into notepad and replace all the tab spaces by a space. For example you will go from

(i=0;i<5;i++){}

(j=0;i<5;i++){}

(k=0;i<5;i++){}

(l=0;i<5;i++){}

(m=0;i<5;i++){}

to

For (i=0;i<5;i++){}

For (j=0;i<5;i++){}

For (k=0;i<5;i++){}

For (l=0;i<5;i++){}

For (m=0;i<5;i++){}

The tab character can be used in notepad by selecting a tab space in word and pasting it into the replace option. It should look like a small vertical rectangle (notepad does not show many symbols but can differentiate between them).

No comments: