Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with VB string character limit. | Excel Worksheet Functions | |||
string problem | Excel Programming | |||
SQL string problem | Excel Programming | |||
string sorting problem | Excel Programming | |||
Formatting Problem on Double-Zero String | Excel Programming |