Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Parsing data - variable length cells

I'd like to parse data like this from a single cell (Treasury bond
interest payment information).

6/30/2004 5625 0 12/31/2004 5625 0 6/30/2005 5625 1000000

The format is always the same, date space interest payment space
principal payment space. So on the last payment date, there is a
value for the principal instead of just zero. Depending on the time
until the bond's maturity, this string set is of varying lengths.

Is there a way to separate each date & add the 2 corresponding
payments in individual cells, allowing for each interest payment &
principal payment to be added together in one cell?

Result:

A1 B1 C1 D1 E1 F1
6/30/04 5625 12/31/04 5625 6/30/05 1005625

Thanks !
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Parsing data - variable length cells

Karen

look at Data | Text to Columns | Delimited (by space) to get the data in
separate cells on the same row. Then a simple formula will add the two
values together.

Regards

Trevor


"Karen" wrote in message
om...
I'd like to parse data like this from a single cell (Treasury bond
interest payment information).

6/30/2004 5625 0 12/31/2004 5625 0 6/30/2005 5625 1000000

The format is always the same, date space interest payment space
principal payment space. So on the last payment date, there is a
value for the principal instead of just zero. Depending on the time
until the bond's maturity, this string set is of varying lengths.

Is there a way to separate each date & add the 2 corresponding
payments in individual cells, allowing for each interest payment &
principal payment to be added together in one cell?

Result:

A1 B1 C1 D1 E1 F1
6/30/04 5625 12/31/04 5625 6/30/05 1005625

Thanks !



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Parsing data - variable length cells

2 ways

1/ Parse data (Text To Column) using space as field devider then use a
formula to add the various column data together to give the desired
string result


2/ build a macro or a function to do the same as option 1


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
charting variable length line data Richard Charts and Charting in Excel 1 October 28th 08 08:04 AM
parsing data with no set delimiter or fixed length. ORLANDO V[_2_] Excel Discussion (Misc queries) 13 February 5th 08 05:06 PM
Inputting variable length data - outputting fixed character result Webster Excel Discussion (Misc queries) 2 October 26th 07 04:55 PM
Parsing Last Character in variable length text field Traci Excel Worksheet Functions 3 October 4th 07 04:11 PM
Graph with variable data length snoach Excel Discussion (Misc queries) 1 May 27th 05 10:15 AM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"