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

I import team performance data. The teams may have 12 players but jersey
numbers may run from 1 to 20. The numbers are not sorted..

In a simplified way I receive data as under B and would like to have them
parsed as under C There will be at least 6 matches and four teams at
different sheets.Could this be done with a scrpt.

A B C

1 1 1

2 4 -

3 3 3

4 4

etc

20

1 1 1


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default parsing data

This may be a start:

Sub zParse()
Dim iRowA&, iRowZ&, iRowV&, s1$, zCell As Range
With ActiveSheet
iRowA = 2
iRowZ = .UsedRange.SpecialCells(xlCellTypeLastCell).Row
Range(Cells(2, 3), Cells(iRowZ, 3)) = "'-"
For iRowV = 2 To iRowZ
s1 = .Cells(iRowV, 2)
Set zCell = .Columns(1).Find(s1, , xlValues, xlWhole)
If Not zCell Is Nothing Then
.Cells(zCell.Row, 3) = s1
End If
Next iRowV
End With
End Sub ' Dave D-C

.. four teams at different sheets ..

If this works, you could do it for other sheets.

"leovh" wrote:
I import team performance data. The teams may have 12 players but jersey
numbers may run from 1 to 20. The numbers are not sorted..

In a simplified way I receive data as under B and would like to have them
parsed as under C There will be at least 6 matches and four teams at
different sheets.Could this be done with a scrpt.

A B C
1 1 1
2 4 -
3 3 3
4 4
etc
20

what's this?
1 1 1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default parsing data

Probably better is a sheet solution:
in C2, put
=IF(ISNA(MATCH(A2,B:B,FALSE)),"-",A2)
and copy down.

Dave D-C wrote:
This may be a start:
Sub zParse()

[deleted]

"leovh" wrote:
I import team performance data. The teams may have 12 players but jersey
numbers may run from 1 to 20. The numbers are not sorted..

In a simplified way I receive data as under B and would like to have them
parsed as under C There will be at least 6 matches and four teams at
different sheets.Could this be done with a scrpt.

A B C
1 1 1
2 4 -
3 3 3
4 4
etc
20

what's this?
1 1 1


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
Text parsing - Extracting data from inconsistent data entry format. u473 Excel Programming 2 August 26th 07 01:51 AM
Data Parsing prepotency Excel Programming 1 June 9th 05 10:09 PM
help with data parsing Param Dhillon Excel Programming 5 February 24th 05 03:29 AM
Parsing Data Amit Excel Programming 1 February 13th 04 07:32 PM
Parsing Data MGAL Excel Programming 5 January 20th 04 03:08 AM


All times are GMT +1. The time now is 06:37 AM.

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

About Us

"It's about Microsoft Excel"