Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Excel table where the cells in a column may have multiple rows. I would like to append text to each row.

The existing column might look something like (where an extra line break is used to separate cells):

MN 02

LB 01
MN 11
GF 05

LB 02
GF 01

LB 05

I'd like to change this to something like:

17 MN 02

17 LB 01
17 MN 11
17 GF 05

17 LB 02
17 GF 01

17 LB 05

A simple append (="17 " & A1) would work for cells with a single row of text, but I cannot figure out how to do this for each row of text.

Thank you.

share|improve this question

migrated from stackoverflow.com Dec 12 '12 at 2:40

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Try something like this?

="17"&SUBSTITUTE(A1,CHAR(10),CHAR(10)&"17")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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