Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2015, 09:17 PM
lbeck lbeck is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2013
Novice
split row of cells at semicolon
 
Join Date: Jun 2015
Posts: 11
lbeck is on a distinguished road
Default split row of cells at semicolon

Suppose I have a program that returns data in one row of cells. The cells in the row repeat in groups of five. I have the ability to format the exported data, and want to place a semicolon or other character at the end of each group of five to produce a line break.

My objective is to have five columns, each with the same data category, so that 12345;12345;12345 becomes:

12345
12345
12345

in five columns.

Each digit represents a cell, so the above example would no longer be 15 cells in one row but 3 rows of 5 cells each.
Reply With Quote
  #2  
Old 06-03-2015, 09:17 AM
NoSparks NoSparks is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

This is an interesting question, but I'm not exactly sure what it is.

If the aim is to insert semicolons (or other character) in the raw data from the "suppose I have a program", prior to Excel getting the data, it's probably a question that should be asked of that particular program.

If the aim is to accept the raw data as is and have Excel manipulate it before placement of the data into cells, we would need to have an accurate sample of the data Excel is getting to work with. I emphasize accurate because if the data is now going into separate cells then the 12345 as you indicate would have a delimiting character between the individual digits.
Reply With Quote
  #3  
Old 06-03-2015, 01:26 PM
lbeck lbeck is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2013
Novice
split row of cells at semicolon
 
Join Date: Jun 2015
Posts: 11
lbeck is on a distinguished road
Default

Sorry, I was trying to be concise. The actual application is this. I have a plug-in to Photoshop Lightroom that exports EXIF data for each photograph selected from the library.The data is reported as a.TXT file. I can copy the TXT file and paste it onto an Excel spreadsheet. Problem is that The data is presented as a long string with multiple data sets, Each with identical, repeating fields. What I want to do is to separate that long row into columns.then I would put headings on each column for shutter speed, aperture etc. I was thinking that I could place a character like a ; after each repeating data set and have Excel parse that data from the row and place it into columns. I believe this is possible, but I don't know how to do it.
Reply With Quote
  #4  
Old 06-03-2015, 05:16 PM
NoSparks NoSparks is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

I think you're over thinking things and saying you want to alter the text file before giving it to Excel.

Personally, if the text file is copying into Excel now, I'd paste it into a sheet, run a macro with a loop or two to move the cell contents to the desired locations then delete the original.

Not seeing the actual text file or an Excel sheet with the text file already copied in, suggesting anything more would just be guessing.
Reply With Quote
  #5  
Old 06-03-2015, 05:48 PM
lbeck lbeck is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2013
Novice
split row of cells at semicolon
 
Join Date: Jun 2015
Posts: 11
lbeck is on a distinguished road
Default

Macro......

That word scares me. I'm not an Excel expert and have never written a macro of any sort. But I have worked with most of the Excel menu functions over the years. I seem to remember cut/pasting text into a spreadsheet and a wizard appearing asking if I wanted the cells to be parsed at a character like a comma or semicolon, or whether I wanted fixed width (vertical lines appearing in the wizard) columns.

That's kind of what I was hoping. For example "Go to menu/Insert (or data, whatever)/a/b/c" to find how to split the horizontal row of text to split it at designated points and move the groupings into columns.

I'm still not convinced that there isn't a way for Excel to do the work without my need to write a unique macro. Maybe I'm wrong, but I'll keep trying.

Just for fun, I've pasted one set of exported data groups below with semicolons inserted at the desired break points. This can be bulk copied and pasted into cell A:1 and a long string appears. The original text had many spaces between data entries like the export expected data to be parsed from the string. my preview of this post shows that white space removed. I can of course cut the text groups from the string and align them into columns manually, but that would be more work than my objectives can tolerate.

I'm not trying to get you to do the work for me, only to give the best example. Once I get this figured out, I plan to export literally thousands of individual pieces of information to construct a database of information that I then can search and sort in Excel.


20060814-100_3700132920.JPG 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060814-3702 enhanced132950.JPG 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060814-100_3704 (2)133014.jpg 1/750 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060814-100_3704133014.JPG 1/750 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060814-100_3705133045.JPG 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060814-100_3707134901.JPG 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060814-100_3717140231.JPG 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060814-100_3733 Edited by Andy155547.jpg 1/1000 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Adobe Photoshop Lightroom 5.7 (Windows) ;20060814-100_3733155547.JPG 1/1000 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060814-100_3733 Edited by Lee155547.jpg 1/1000 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA Microsoft Photo Gallery 16.4.3528.331 ;20060816-Waterfall Cascades135737.jpg 1/500 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060816-Snow-covered Mountains - cloned140319.jpg 1/750 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060816-Snow-covered Mountains140319.jpg 1/750 ISO 100 KODAK DX7630 ZOOM DIGITAL CAMERA ;20060822-Panorama at Lak Louise (2)154143.jpg Microsoft Photo Gallery 16.4.3528.331 ;20060822-Panorama at Lak Louise154143.jpg ;20060822-Pan-Emerald Lake155414.jpg ;20060822-Pan-Gondola191518.jpg ;IMG_0002.JPG 3.94 1/40 ISO 64 iPhone 5c Microsoft Windows Live Photo Gallery 15.4.3555.308 ;IMG_0004.JPG ;IMG_0008.JPG 6.08 1/120 ISO 50 iPhone 5c Microsoft Windows Live Photo Gallery 15.4.3555.308 ;IMG_0009.JPG 6.58 1/150 ISO 50 iPhone 5c Microsoft Windows Live Photo Gallery 15.4.3555.308 ;IMG_0010.JPG 6.74 1/150 ISO 50 iPhone 5c Microsoft Windows Live Photo Gallery 15.4.3555.308 ;IMG_0011.JPG 4.97 1/120 ISO 80 iPhone 5c Microsoft Windows Live Photo Gallery 15.4.3555.308 ;
Reply With Quote
  #6  
Old 06-03-2015, 06:03 PM
lbeck lbeck is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2013
Novice
split row of cells at semicolon
 
Join Date: Jun 2015
Posts: 11
lbeck is on a distinguished road
Default

Just for kicks, I'm attaching a copy of the spreadsheet with the string inserted.
Attached Files
File Type: xls EXIF export example.xls (27.5 KB, 15 views)
Reply With Quote
  #7  
Old 06-03-2015, 08:52 PM
NoSparks NoSparks is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Just for more kicks can you attach the actual file you used for what is in row one of the Excel sheet. My suspicion is that it's full of unprintable characters which don't show with what you pasted into #5.

The semicolons in your first row are a consistent 9 columns apart. Did the blank columns happen on their own? If so, use replace or substitute to change those semicolons to chr(10) and give it a try.
Reply With Quote
  #8  
Old 06-04-2015, 06:50 AM
NoSparks NoSparks is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Have a look at this, there's a macro included to take your first row and put it into individual rows starting on row 10.
Alt + F8 will bring up the macro dialogue so you can run it.

I would hope this isn't necessary and that the LR add-in would have some kind of setup that allows the selection of delimiters.
Attached Files
File Type: xls EXIF export example_with_macro.xls (37.5 KB, 13 views)
Reply With Quote
  #9  
Old 06-06-2015, 01:55 PM
lbeck lbeck is offline split row of cells at semicolon Windows 7 64bit split row of cells at semicolon Office 2013
Novice
split row of cells at semicolon
 
Join Date: Jun 2015
Posts: 11
lbeck is on a distinguished road
Default

Wow! That works.

Like you, I would think that the guy who coded the Plugin has the expertise to format to columns rather than one long string.

I need to learn more about macros. In the mean time, I'll use yours and see if it will work for the entire dataset of thousands of entries. If not, maybe I can become smart enough to modify the macro.

Thanks for your help.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to split merged data into vertical saperate cells cheekugreat Excel 5 10-11-2014 05:53 AM
Copying text range of cells to different cells adds an extra line jpb103 Word VBA 2 07-23-2014 12:22 PM
Populate Cells with info contained in other cells EC37 Excel Programming 8 07-16-2014 10:55 AM
Losing rows when pasting split cells Gitley Word Tables 1 01-15-2013 07:49 AM
Count range cells eliminating merge cells danbenedek Excel 0 06-15-2010 12:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft