Find max value of hyphenated numbers in a row

mlbillow

New Member
Joined
Nov 14, 2005
Messages
8
Office Version
  1. 365
I am a track coach and we record the distances thrown for shotput and discus and currently enter it as "feet-inches" so a shotput throw of 45 feet 6 inches is recorded at 45-06 and a throw of 46 feet 2 1/4 inch is recorded 46-0225. We track every throw from every meet in a spreadsheet throughout the season. We need to find the highest value and return that value in the same format (45-06). Below is a sample of what our data looks like:

NameSeason BestMeet #1Meet #2Meet #3Meet #4
Parker45-0644-1146-022545-07
Dean44-0444-097543-0147-00

Is there an easy way to find the max value and return it in the same format? Or is there an easier way to enter the distance in feet & inches that would make it easier to use? I don't want to have to convert their distance to inches as we need it in Feet & Inches.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
what version of excel do you have -
had a play with substitute - but i lose the 00 - need to look at that - but i think as you report inches could just substture the inch number as a decimal
=SUBSTITUTE(MAX(SUBSTITUTE(C2:F2,"-",".")*1),".","-")
 
Upvote 0
Thanks for that.
How about
Fluff.xlsm
ABCDEF
1NameSeason BestMeet #1Meet #2Meet #3Meet #4
2Parker46-022545-0644-1146-022545-07
3Dean47-0044-0444-097543-0147-00
Sheet5
Cell Formulas
RangeFormula
B2:B3B2=LET(s,--SUBSTITUTE(C2:F2,"-","."),INDEX(C2:F2,XMATCH(MAX(s),s)))
 
Upvote 1
Solution
edit - posted as fluff posted hes
=LET(s,--SUBSTITUTE(C2:F2,"-","."),INDEX(C2:F2,XMATCH(MAX(s),s)))

i'm sure fluff will be back with a better solution
=SUBSTITUTE(TEXT(MAX(SUBSTITUTE(C2:F2,"-",".")*1),"0.0000"),".","-")
Book1
ABCDEFGH
1NameSeason BestMeet #1Meet #2Meet #3Meet #4
2Parker45-0644-1146-022545-0746-0225
3Dean44-0444-097543-0147-0047-0000
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=SUBSTITUTE(TEXT(MAX(SUBSTITUTE(C2:F2,"-",".")*1),"0.0000"),".","-")
 
Upvote 0
Glad we could help & thanks for the feedback.

Please don't forget to update your profile to show what version of Excel you're using, as it saves people from having to ask. ;)
 
Upvote 0
What if we changed the values for 46 feet 2 1/4 inch from 46-0225 to 46-02.25? One of the other coaches would prefer the inches in decimel format instead.
 
Upvote 0
How about
Excel Formula:
=LET(s,--SUBSTITUTE(SUBSTITUTE(C2:F2,".",""),"-","."),INDEX(C2:F2,XMATCH(MAX(s),s)))
 
Upvote 1

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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