2

I have lots of cells that contain unique text.

I'd like to add a <p> to the start of the cell and a </p> to the end of the string in the cell.

Turning this:
Here is some text I've written. It's different in each cell.
into this:
<p>Here is some text I've written. It's different in each cell.</p>

I've tried =CONCATENATE("<p>",A1) but can't find a way to add something to the end of the cell as well?

3

You can just add another parameter to your CONCATENATE:

=CONCATENATE("<p>", A1, "</p>")

(you might have to use ; instead of , depending on your locale) See documentation

This can be shortened to

="<p>" & A1 & "</p>"

since & is the string concatenation operator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.