find the highest number in a string of numbers

Jerk24

Board Regular
Joined
Oct 10, 2012
Messages
190
I have asked two questions today both answered. sooooo

is it possible to find the highest number is a string of numbers, in different cells:

cell c3 = 12+13+14
cell d3 = 20+21+22
cell e3 = 12+20+20

there are alot more and was wondering if there was a way for me to just add everything and not worry about the "HIGH Game"? the formula i have =LARGE(C3:K3,1) Which brings the highest number, not the single highest number

<tbody>
</tbody><colgroup><col></colgroup>
 
When Someone misses a week, the abs is manually input by me to represent Absent. The code is working fine, but when it detects anything other than a number it will return the "#Name?" error. below will show a how the code works and then how it returns the error. is there a way to tell the code to only look at numbers?

Wk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8Wk 9
ABS475464
Wk 10Wk 11Wk 12Wk 13Wk 14Wk 15Wk 16Wk 17Wk 18# GamesPointsAVGHi GmHi TrpTurksLst Wk
916518.33#NAME?64264
Wk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8Wk 9
61526974
Wk 10Wk 11Wk 12Wk 13Wk 14Wk 15Wk 16Wk 17Wk 18# GamesPointsAVGHi GmHi TrpTurksLst Wk
1225621.332774274
Wk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8Wk 9
37473541
Wk 10Wk 11Wk 12Wk 13Wk 14Wk 15Wk 16Wk 17Wk 18# GamesPointsAVGHi GmHi TrpTurksLst Wk
1216013.332147041
Wk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8Wk 9
34532643
Wk 10Wk 11Wk 12Wk 13Wk 14Wk 15Wk 16Wk 17Wk 18# GamesPointsAVGHi GmHi TrpTurksLst Wk
1215613.002053043
Wk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8Wk 9
38ABS34ABS
Wk 10Wk 11Wk 12Wk 13Wk 14Wk 15Wk 16Wk 17Wk 18# GamesPointsAVGHi GmHi TrpTurksLst Wk
67212.00#NAME?380ABS

<tbody>
</tbody><colgroup><col span="3"><col><col span="5"><col><col><col><col><col><col><col></colgroup>
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Thank you for the table... that clarified everything for me. My previously posted code (Message #17) did not know about the "ABS" entries (you hadn't mentioned them before), so when it got included in the text string my code formed to feed into the MAX function, VB "choked" when it tried to process it along with other real numbers. Here is that previously posted code, modified to ignore the "ABS" entries (all I had to do to fix it was add the red highligted part to my previous code)...

Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
  Dim X As Long, Pluses As String, Numbers As Variant, Rng As Range
  Const SetOffsets As Long = 4
  For X = 0 To 47
    If Not Intersect(Target, Range("C3:K3,C5:K5").Offset(X * SetOffsets)) Is Nothing Then
      Set Rng = Range("C3:K3,C5:K5").Offset(X * SetOffsets)
      GoTo Continue
    End If
  Next
  Exit Sub
Continue:
  With WorksheetFunction
    Pluses = .Trim(Join(.Index(Rng.Areas(1).Formula, 1, 0), " ")) & _
             "+" & .Trim(Join(.Index(Rng.Areas(2).Formula, 1, 0), " "))
    Pluses = Replace(.Trim(Replace(Replace(Pluses, "+", " "), "=", " ")), "ABS", 0, , , vbTextCompare)
    Cells(Rng(1).Row + 2, "O").Value = Evaluate("MAX(" & Replace(Pluses, " ", ",") & ")")
  End With
End Sub
 
Upvote 0
Thank you, I copied the code to the sheet and retyped all of the cells containing ABS (you mentioned before that I needed to update the cells for the event to work) and nothing happened. Is there another step I am missing?
 
Upvote 0
Nevermind. I saved the XLSM, and re-opened and now it is working when I re-input the cell values,

thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

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