A complicated problem? What is the best approach?

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,041
Office Version
  1. 365
Platform
  1. Windows
I have two spreadsheets. The first has a list of teams in cells A4:A20 The second has details of match scores (consisting of two innings). What I wish to do is compare scores to those on my first spreadsheet and if a record has been broken, for a text message "New highest score" to be displayed on the second sheet in cell B25.

Details: on the first spreadsheet, the teams are listed in cells A4:A20 and the current record scores listed in B4:B20
On the second spreadsheet, the team name will be in either F10 or F15 (but not both) and their scores in either P10 or P11 (linked to the team in F10) or P15 or P16 (linked to the team in F15).

Any suggestions on how I should approach this will be greatly appreciated.

Mel
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
That sounds like a simple XLOOKUP/VLOOKUP to get the current record and compare it to whichever cell has the current score in it.
 
Upvote 0
Hi Rory,

Thanks for your reply. Could you explain what you mean by XLOOKUP/VLOOKUP, please?

Mel
 
Upvote 0
I mean you lookup the team name - e.g.
=VLOOKUP(F10,Sheet1!$A$4:$B$20,2,false)

will lookup the team name in F10 in A4:A20 on sheet 1 and return the corresponding value from B4:B20. You can then simply compare that to the value in P10/P11 (it's not clear to me how you decide which cell has the correct value).
 
Upvote 0
Hi Rory,

The 'best' value could be either in P10 or P11 (1st or 2nd innings) if F10 is the team being compared or P15 or P16 if F15 is the team being compared.

Mel
 
Upvote 0
So which team does the message base itself on? Both?
 
Upvote 0
For example: if F10 = Warwickshire, that is no match, therefore F15 will match to one of the teams in sheet 1 range A4:A20 (and vice versa). If F10 matches to sheet 1 range A4:A20 then the value of P10 or P11 (the higher value) will be the base for triggering the message.

Mel
 
Upvote 0
Something like:

Excel Formula:
=IF(IFERROR(VLOOKUP(F10,Sheet1!$A$4:$B$20,2,false)<MAX(P10:P11),VLOOKUP(F15,Sheet1!$A$4:$B$20,2,false)<MAX(P15:P16)),"New highest score","")
 
Upvote 0
Solution

Forum statistics

Threads
1,221,595
Messages
6,160,701
Members
451,665
Latest member
PierreF

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