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


this will probably be completely obvious to some of you but being a bi
thick its got me stumped. i have a workbook which contains the result
and a table for the current premier football league.i have two range
in the worksheet (myresults and mytable). What needs to happen is th
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 b
able to run successfully for any number of teams in the league and an
number of matches played. both of these should be detected from th
data. you may assume that the spelling of teams names in the result
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 th
myresults range, eg.tottenham, and get it to correspond with wher
tottenham may happen to be in the mytable range?

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

chri

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

--
cjsmith2
-----------------------------------------------------------------------
cjsmith22's Profile: http://www.excelforum.com/member.php...fo&userid=2852
View this thread: http://www.excelforum.com/showthread.php?threadid=48182

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default detecting data in a range

Might help to see your code.
The VLOOKUP and MATCH may be useful.
In code something like:
myResult = Application.WorksheetFunction,VLookup("Tottenham", Range("Some
Range"),Some Number,False)....hard to be more specific ....perhaps
specify some concrete values where the data resides. Another way is to
set up a Do...Loop and cycle through your tables looking for the results
you want.
PS What the %^!!@?$! happened to ManU?

cjsmith22 wrote:
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


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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting data in a range


cheers for the response dysgraphia - have attached what little i've done
so far which basically amounts to setting my ranges. I think what i need
to have is some sort of loop which first goes through my results range
to find the first team (say, arsenal), then checks if arsenal won, then
finds arsenal in the table range and adjusts its position accordingly,
then moves on to birmingham, then bolton etc.
what i cant understand is how you can then make it work for any set of
data, ie. the same macro working for a different set of teams and
different results. make any sense?

ps. utd have lost it mate - no midfield, *$%* at the back - all they've
got is ruud + rooney !


+-------------------------------------------------------------------+
|Filename: Copy of Table.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3990 |
+-------------------------------------------------------------------+

--
cjsmith22
------------------------------------------------------------------------
cjsmith22's Profile: http://www.excelforum.com/member.php...o&userid=28528
View this thread: http://www.excelforum.com/showthread...hreadid=481826

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting data in a range


dysgraphi

--
cjsmith2
-----------------------------------------------------------------------
cjsmith22's Profile: http://www.excelforum.com/member.php...fo&userid=2852
View this thread: http://www.excelforum.com/showthread.php?threadid=48182

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
detecting range of spreadsheet altein New Users to Excel 1 February 22nd 08 11:28 PM
Detecting patters in data Hjustiner Excel Worksheet Functions 0 March 26th 06 11:43 PM
Detecting if a range contains a shape Nick Hebb Excel Programming 3 October 28th 05 02:45 AM
Detecting Row Selection Nigel Excel Programming 1 January 2nd 05 03:48 PM
Detecting a color Duncan Help Excel Worksheet Functions 5 December 9th 04 08:12 PM


All times are GMT +1. The time now is 01:33 PM.

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"