Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

Try something like this?

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .