[Solved] Adding text from one cell to the middle of text in another.

WezC

New member
Hello everyone, I am new to excel and hoping someone can help me. I have a html file (text) in a cell with a place marker [SWAP]
I want to replace [SWAP] with the text content of cell G . This needs to be a formula so I can drag it down over 1000 rows and it change correctly for each row.

I hope I have explained that :)

Regards

Wez
 
Hello Wez,

Welcome to the forum! You can achieve this using the SUBSTITUTE function in Excel. Assuming the HTML content with [SWAP] is in column A and the replacement text is in column G, you can use the following formula:

Formula:
=SUBSTITUTE(A1, "[SWAP]", G1)

  • A1: The cell containing the HTML file with the [SWAP] placeholder.
  • "[SWAP]": The placeholder text to replace.
  • G1: The cell containing the text to replace [SWAP].
Drag this formula down to apply it to the entire column, and it will dynamically update for each row.
 

Online statistics

Members online
1
Guests online
275
Total visitors
276

Forum statistics

Threads
456
Messages
2,026
Members
1,951
Latest member
lwf168com
Back
Top