detecting data in a worksheet

cjsmith22

New Member
Joined
Nov 2, 2005
Messages
22
this will probably be completely obvious to some of you but being a bit thick its got me stumped. i have a workbook which contains the results and a table for the current premier football league.i have two ranges in the worksheet (myresults and mytable). What needs to happen is the table needs to update depending on the results that particular week.

the thing that i cant get my head around is this - "the macro should be able to run successfully for any number of teams in the league and any number of matches played. both of these should be detected from the data. you may assume that the spelling of teams names in the results section corresponds exactly to the spelling used in the league table - bearing in mind that a teams name can appear twice in a set of results"

so how do i get my macro to detect, for example whats in cell b2 of the myresults range, eg.tottenham, and get it to correspond with where tottenham may happen to be in the mytable range?

if that made the slightest bit of sense at all, thanks in advance

chris
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Chris

I think it would be beneficial if you could post an example of the League table you are aiming to produce and the dataset of results that is going to drive this (preferably via the html prog) and an expected result from that data. It would avoid any misunderstandings in what you are trying to achieve.

Best regards

Richard
 
Upvote 0
Copy of Table22.xls
ABCDEFGHI
5DateHomeTeamAwayteam
625-Sep-05Middlesbrough0Sunderland2
726-Sep-05Tottenham1Fulham0
801-Oct-05Portsmouth0Newcastle0
901-Oct-05Sunderland1WestHam1
Update 8
Copy of Table22.xls
ABCDEFGHIJKLMN
11HomeAway
12PWDLFAWDLFAGDPts
13Chelsea740091300501321
14Charlton61011240092615
15Bolton72113121053414
16WestHam62118311021611
17ManUtd61113321040411
18ManCity71112221154111
19Arsenal63008101213510
20Wigan61112220132110
21Tottenham6111221203129
22Middlesbrough61112411143-18
Update 8
 
Upvote 0
thanks for the reply parsnip. couldnt include all of both ranges because they wouldnt fit. basically my results range needs to update my leaguetable range, so with the example of tottenham (A21 at the minute),they have just won 1-0 so their league stats need to be updated (+3 in the pts column, +1 in the P column, +1 in the W column etc) the problem is this needs to work for any set of results ie. the macro needs to check what data is in a particular cell of the results range and match it to the same in the league table range. does that make any sense? i think the macro is going to turn out a lot more complicated than i had originally anticipated. cheers for the help anyway.
chris
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top