Question : Need to insert a formula into a text string in Excel

Hello All,

     I consider myself to be pretty good with Excel and what I don't know I usually can find the answer to pretty quickly just be skimming the help files.  This question remains elusive however.

I have two columns. A will contain various text statements they will all be different length, content, etc.  No two rows will be alike in this column. B will contain a code.

I need to figure out if there is a way to insert that code, using a formula (=B1 or =B3 etc) in a location in the middle of the text in Column A.   The location of that formula insertion will be variable, so again not consistent. It may need to be at the start of the statement, or 15 words in, or at the end, etc.

I suspect there is no way or no easy way to accomplish this but thought I would throw it out there just in case - I certainly don't claim to know it all!

Answer : Need to insert a formula into a text string in Excel

Not sure what you mean by "Insert that code."

If both columns are just text, then this should be easy, but you're going to have to provide the selection criteria.

If A is text, and B is text that you want to insert into the middle of A, somewhere (at like the Nth character) then this formula will do it:

=CONCATENATE(LEFT(A1,C1),B1,RIGHT(A1,LEN(A1)-C1))

where C1 contains an integer N, which is the character at which B1 will be inserted into A1.
Random Solutions  
 
programming4us programming4us