ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting Data (https://www.excelbanter.com/excel-discussion-misc-queries/91657-sorting-data.html)

dgoodrid

Sorting Data
 

Does anyone know how to Look throught a list of cells with specific data
in them, and then pick the first entry of a selected item name and then
get more data from that selection. Then look for the 2nd entry and do
the same until there are no more entries.

Example:-

"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
England 3 1 Sweeden
Germany 0 9 Iran
Italy 4 4 Spain
Holland 0 0 Argentina
Germany 2 20 England

What i want is to pick all of England Games's as you enter them down a
long list. The Data i would need to extract would be "Home Name" "Home
Score" "Away Score" "Away Team" and then list then in the order they
appear in the list. Then do the same for all other teams. Into a list
like below

**England**
"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
England 3 1 Sweeden
Germany 2 20 England

**Germany**
"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
Germany 0 9 Iran
Germany 2 20 England


--
dgoodrid
------------------------------------------------------------------------
dgoodrid's Profile: http://www.excelforum.com/member.php...o&userid=34709
View this thread: http://www.excelforum.com/showthread...hreadid=547510


Marcelo

Sorting Data
 
why do not use a Pivot table? and why Brazil is out of your list ?

regards from Brazil
Marcelo

"dgoodrid" escreveu:


Does anyone know how to Look throught a list of cells with specific data
in them, and then pick the first entry of a selected item name and then
get more data from that selection. Then look for the 2nd entry and do
the same until there are no more entries.

Example:-

"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
England 3 1 Sweeden
Germany 0 9 Iran
Italy 4 4 Spain
Holland 0 0 Argentina
Germany 2 20 England

What i want is to pick all of England Games's as you enter them down a
long list. The Data i would need to extract would be "Home Name" "Home
Score" "Away Score" "Away Team" and then list then in the order they
appear in the list. Then do the same for all other teams. Into a list
like below

**England**
"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
England 3 1 Sweeden
Germany 2 20 England

**Germany**
"Home Name" "Home Score" "Away Score" "Away Team"
-------------------------------------------------------
Germany 0 9 Iran
Germany 2 20 England


--
dgoodrid
------------------------------------------------------------------------
dgoodrid's Profile: http://www.excelforum.com/member.php...o&userid=34709
View this thread: http://www.excelforum.com/showthread...hreadid=547510



mrice

Sorting Data
 

Try the attached - you can see the macro code with ALT-F11.

Enter the results and hit the update button. It works by creating a
unique array of team names and then interogating the list for
occurences in either the home or away columns

I hope that your prediction for the England - Germany match comes
true...


+-------------------------------------------------------------------+
|Filename: Book1.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4834 |
+-------------------------------------------------------------------+

--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=547510


dgoodrid

Sorting Data
 

Martin,

Thanks thats great, I was trying everything with just cell coding but
dont think it's possible. Your way is great! :)

Dave


--
dgoodrid
------------------------------------------------------------------------
dgoodrid's Profile: http://www.excelforum.com/member.php...o&userid=34709
View this thread: http://www.excelforum.com/showthread...hreadid=547510


dgoodrid

Sorting Data
 

Quick Question,

How can i get it so the results apear in different Collums instead or
Rows? With 3 Collums in between. Also how can i get this to start from
row 3 not 2 and Colum B not A. Sorry to be a pain


Dave:) :)


--
dgoodrid
------------------------------------------------------------------------
dgoodrid's Profile: http://www.excelforum.com/member.php...o&userid=34709
View this thread: http://www.excelforum.com/showthread...hreadid=547510



All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com