Thanks everybody for help! How to delite a part of entry for a col

U

usmleboy

Hi there again.
Thank you guys for very helpful information.

I am continuing my work with a prospective clinical study for my project.
You taught me how to add text to the existing records. Would you mind to help
me with several tips on deleting small parts existing text in the column?

Ex:
ID Patient Tissue type Code
10 Snow, John Plasma 10SJ-P
11 George, Roy T-cells 11GR-T

I want to delete "P" and "T" for all samples in the Code column. The
expecting result should look like this:

Ex:
ID Patient Tissue type Code
10 Snow, John Plasma 10SJ
11 George, Roy T-cells 11GR

Thanks a lot!!!
Daniel
 
K

Ken Johnson

Hi usmleboy,
If D2 shows 10SJ-P and E2 has =LEFT(D2,LEN(D2)-2) then in E2 you should
see 10SJ, (provided Column E is not formatted as Text).
You could then double click the fill handle, which is a fine cross that
only appears when the fat cross cursor is positioned over the bottom
right corner of the selected cell, then the formula in E2 is filled
down to the bottom of your data. You could then copy column E and
edit>paste special>paste values over the old values in column D.
Ken Johnson
 
J

Jonathan Cooper

Assuming your text is in column 1, use the following formula in a helper
column.

=LEFT(A1,FIND("-",A1)-1)
 
B

Bob Phillips

Just add a column and a formula of

=LEFT(D2,FIND("-",D2)-1)

and copy down.

Copy that column, then Edit>Pastespecial>Values, the delete the old column.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

raf

Daniel,
click the edit menu, find type "10SJ-P" search by column, click replace type
"10SJ", click find next, click replace or replace all.
Hope this helps.
 

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