ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   text editing function help (https://www.excelbanter.com/excel-worksheet-functions/46124-text-editing-function-help.html)

JenBasch

text editing function help
 

I am trying to figure out how write a macro for the following things to
happen:

_Column_1_ _-Column_2-_ _*Column_3*_
word1 -word2-
*word1word2*
word1 -word2-
*word1-word2*
word1 -word2 word3-
*word1word2word3*
word1 -word2 word3-
*word1-word2-word3*

Column 3 is what I am hoping for an output column using columns 1 & 2.
I have figured out how to do the first 2 rows, I am having trouble the
3rd and 4th rows.

Please advise.
Thanks,
JenBasch


--
JenBasch
------------------------------------------------------------------------
JenBasch's Profile: http://www.excelforum.com/member.php...o&userid=27369
View this thread: http://www.excelforum.com/showthread...hreadid=468872


swatsp0p


Jen: do you want a Formula or a Macro?

Can we assume for word1 word2 word3 word1word2word3 you mean a formula
in column 4? (not col. 3, as that has your word3)

If you are using a Macro, what code are do you have for rows 1 and 2?

More info, please

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=468872


JenBasch


Bruce,

I tried to lay it out as best as I could in the original post, but
maybe it wasn't very understandable. word2 & word3 are both in column 3
(column 1 = plain text, -column 2 = italized text-, *column 3 = bold
text*) and that is where I'm running into my problem. I intially just
want a formula in column 3 to do this. Eventually I want a Macro to
look through a list of cells and have them all the different outputs
depending on what they find in column 1 and column 2. Hopefully this
makes things a little more clear.

Thanks,
Jen


--
JenBasch
------------------------------------------------------------------------
JenBasch's Profile: http://www.excelforum.com/member.php...o&userid=27369
View this thread: http://www.excelforum.com/showthread...hreadid=468872


swatsp0p


Is this what you are after?:

Code:
--------------------

|----A----|----B----|---C---|
1 dog....|house...|*doghouse*|
2 dog....|house...|*dog-house*|
3 red.....|dog house|*reddoghouse*|
4 red.....|dog house|*red-dog-house*|
--------------------


where the *BOLD* text is the expect output in Col. C


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=468872



All times are GMT +1. The time now is 06:59 PM.

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