conditional copying

  • Thread starter Thread starter Grayling
  • Start date Start date
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
 
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","")
 
Back
Top