Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default String problem.

Hi,

I have some worksheets that have the following type of data.

****DATA***** ****DATA***** ****DATA***** ****DATA*****
****DATA***** ****DATA***** ****DATA***** ****DATA*****
****DATA***** ****DATA***** ****DATA***** ****DATA*****
The required data in each string can be found by counting from the
left....or it can be found by testing for the second full stop in the string.
Each worksheet has a different number of rows. I need to take the DATA out
of each cell on the same row and concatenate it and move it to the next
worksheet, then move to the next row and repeat, and form a column of data in
the second worksheet.

any help would be great!!
Thanks in advance

Manny
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default String problem.

cnt is the count of the first character in the original string you want in
your result string. You want everything from the point to the right

Sub CopyData()
Dim cnt as Long, rw as long
Dim cell as Range, sStr as String, sStr1 as String
rw = 1
cnt = 9
for each cell in Selection
sStr = cell.Text
sStr1 =right(sStr,len(sStr)-(cnt-1))
Worksheets(2).Cells(rw,1).Value = sStr1
rw = rw + 1
Next
End Sub

--
Regards,
Tom Ogilvy



"Mannyluk" wrote in message
...
Hi,

I have some worksheets that have the following type of data.

****DATA***** ****DATA***** ****DATA***** ****DATA*****
****DATA***** ****DATA***** ****DATA***** ****DATA*****
****DATA***** ****DATA***** ****DATA***** ****DATA*****
The required data in each string can be found by counting from the
left....or it can be found by testing for the second full stop in the

string.
Each worksheet has a different number of rows. I need to take the DATA out
of each cell on the same row and concatenate it and move it to the next
worksheet, then move to the next row and repeat, and form a column of data

in
the second worksheet.

any help would be great!!
Thanks in advance

Manny



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
Problem with VB string character limit. AJL Excel Worksheet Functions 0 November 3rd 06 07:40 PM
string problem pwz Excel Programming 2 June 20th 04 06:11 PM
SQL string problem TLowe Excel Programming 15 June 11th 04 10:56 AM
string sorting problem NikkoW Excel Programming 1 May 2nd 04 04:59 PM
Formatting Problem on Double-Zero String Tom Ogilvy Excel Programming 1 July 18th 03 06:56 PM


All times are GMT +1. The time now is 06:15 PM.

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"