Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shift part of contents of a cell to another cell

Status
Not open for further replies.

warby1212

Programmer
Jun 9, 2003
183
AU
Hi, I have a spreadsheet which I need to modify to import into a database. In some cells there are two values (one above the other). Does anyone perhaps know a trick for taking one of the rows (within the cell) and putting it into an empty column next to it? (it's a big spreadsheet!) [2thumbsup]

I should write something here.
 
Hi warby1212:

If I understand you correctly, your two values in the cell are separated by CHAR(10). See the following to separate the two values into teo different cells ...
Code:
    A       B       C
  -|-------------------
   |23
 1 |       23      16
   |16 
  -|------------------- 
   |31
 2 |       31       7
   |7
  -|-------------------
formula in cell B1 is ... =LEFT($A1,FIND(CHAR(10),$A1)-1)

formula in cell C1 is ... =MID($A1,FIND(CHAR(10),$A1)+1,255)

Would this do?



Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
 



Hi,

It would help if you copy 'n' paste a sample of your data here.

"In some cells there are two values (one above the other)."

It could be a CHAR(10) or CHAR(13), probably the former. You could use Data>Text to columns.



Skip,

[glasses] [red][/red]
[tongue]
 
That's it! You're both right, it's a line break. I wasn't familiar with how to put it in or get it out. This spreadsheet is a monster that little problem is the one I couldn't get of about 20 steps to prepare it for an import. Thanks very much. [2thumbsup]

I'm really not in management but I can't change my profile (I'm a programmer)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top