conditional copying

G

Grayling

Hi

Cells A1-A70 contain various bits of text. I want to put
a formula in the respective cells in B such that if the
text in an A cell contains within it a definite piece of
text - actually, "aF" (eg. draF1 1/DGw) - then copy the A
cell to B without that bit of text (dr1 1/DGw), otherwise
copy the text from A to B just as it is.
Many thanks for any help and also for such superb
assistance in the past.

Grayling
 
H

Harlan Grove

Grayling said:
Cells A1-A70 contain various bits of text. I want to put
a formula in the respective cells in B such that if the
text in an A cell contains within it a definite piece of
text - actually, "aF" (eg. draF1 1/DGw) - then copy the A
cell to B without that bit of text (dr1 1/DGw), otherwise
copy the text from A to B just as it is.
Many thanks for any help and also for such superb
assistance in the past.

Would there be multiple instances of the text you want to eliminate? If so,
would you want to eliminate all such instances or just the first instance?
To eliminate just the first instance, try

B2:
=SUBSTITUTE(A2,"aF","",1)

To eliminate all instances, try

B2:
=SUBSTITUTE(A2,"aF","")
 

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