View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
jo jo is offline
external usenet poster
 
Posts: 5
Default Parse cells with line breaks

Thanks for the response. In my example, there are four rows. Row
three, book column is blank.

Your output shown below is exactly how I would like my output. Based
on my data, there should only be one row with id 2. There should be
one row with id 3 but with no book name.

Does this help?

On Jan 16, 12:06*pm, "Rick Rothstein"
wrote:
Your question is not entirely clear to me; perhaps it is just due to the way
the data got posted. Consider ID 2... is there a line break in that cell
after the one book title? Or does that blank line represent an empty row
between ID 2 and ID 3? (Notice there is no blank line between ID 1 and ID 2,
hence my confusion.)

Also, how you want to show your data on the other sheet is not entirely
clear to me either. Do you want it laid out like this?

ID Books
*1 The Hobbit
*1 Driving Miss Daisy
*2 Only One book
*3
*4 First Book for id 4
*4 Second book for id 4
*4 Third book for id 4

Where each of the lines above is in its own row (in 2 columns per row)? Did
you want ID 3 (the one with no book title) carried across like I show, or
was it not supposed to be shown? If the answer to my first question is that
ID 2 has a line break in it, did you want the blank line after the only
title in it shown or not?

--
Rick (MVP - Excel)

"jo" wrote in message

...



I have a spreadheet with multiple columns of data and some with line
break characters within the cells.


I have an identifier in the left column, A, and the cells with line
breaks inside to the right. For example,


ID *Books


1 * *The Hobbit
* * *Driving Miss Daisy
2 * *Only One book


3


4 * *First Book for id 4
* * *Second book for id 4
* * *Third book for id 4


I need to move this information to another sheet such that the ID is
repeated for each item in the books column. The number of rows per ID
would equal the number of line breaks + 1. How can I do this?- Hide quoted text -


- Show quoted text -