ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   replace question (https://www.excelbanter.com/excel-discussion-misc-queries/112006-replace-question.html)

Mike

replace question
 
Hey guys!

I have 2 columns A and B. What I need to do is take what is in column A and
replace a string of astricks in Column B. For example:

Column A Column B Result
ABC need****help needABChelp
DEF more****help moreDEFhelp

Any idea how to do this??

Thanks guys!

Mike


Toppers

replace question
 
Try:

=SUBSTITUTE(SUBSTITUTE(B1,"*",A1,1),"*","")

This allows for a variable number of asterisks in Column B entries.

HTH

"Mike" wrote:

Hey guys!

I have 2 columns A and B. What I need to do is take what is in column A and
replace a string of astricks in Column B. For example:

Column A Column B Result
ABC need****help needABChelp
DEF more****help moreDEFhelp

Any idea how to do this??

Thanks guys!

Mike


Bob Phillips

replace question
 
=SUBSTITUTE(B1,REPT("*",LEN(B1)-LEN(SUBSTITUTE(B1,"*",""))),A1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Mike" wrote in message
...
Hey guys!

I have 2 columns A and B. What I need to do is take what is in column A

and
replace a string of astricks in Column B. For example:

Column A Column B Result
ABC need****help needABChelp
DEF more****help moreDEFhelp

Any idea how to do this??

Thanks guys!

Mike




Mike

replace question
 
You rock Toppers!! Thanks!!!

"Toppers" wrote:

Try:

=SUBSTITUTE(SUBSTITUTE(B1,"*",A1,1),"*","")

This allows for a variable number of asterisks in Column B entries.

HTH

"Mike" wrote:

Hey guys!

I have 2 columns A and B. What I need to do is take what is in column A and
replace a string of astricks in Column B. For example:

Column A Column B Result
ABC need****help needABChelp
DEF more****help moreDEFhelp

Any idea how to do this??

Thanks guys!

Mike


Bob Phillips

replace question
 
Mine's cleverer, but yours is better <g

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Toppers" wrote in message
...
Try:

=SUBSTITUTE(SUBSTITUTE(B1,"*",A1,1),"*","")

This allows for a variable number of asterisks in Column B entries.

HTH

"Mike" wrote:

Hey guys!

I have 2 columns A and B. What I need to do is take what is in column A

and
replace a string of astricks in Column B. For example:

Column A Column B Result
ABC need****help needABChelp
DEF more****help moreDEFhelp

Any idea how to do this??

Thanks guys!

Mike





All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com