Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have a spreadsheet with laods data in. In coloum b I have numbers, I want to find the higest number in that coloum. Once it has found this number I then want it to offset one cross to coloum a then give me msgbox saying the value of that cell in coloum a. What best way to do this many thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub test() MaxVal = Application.WorksheetFunction.Max(Range("B:B")) Set rng = Range("B:B").Find(MaxVal) MsgBox rng.Offset(0, -1).Value End Sub -- Dan On Jan 3, 3:25*pm, millwalll wrote: Hi all, I have a spreadsheet with laods data in. In coloum b I have numbers, I want to find the higest number in that coloum. Once it has found this number I then want it to offset one cross to coloum a then give me msgbox saying the value of that cell in coloum a. What best way to do this many thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way
Sub findmaxoffset() msgbox Cells(Columns(2).Find(Application.Max(Columns(2))) .Row, 1) End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "millwalll" wrote in message ... Hi all, I have a spreadsheet with laods data in. In coloum b I have numbers, I want to find the higest number in that coloum. Once it has found this number I then want it to offset one cross to coloum a then give me msgbox saying the value of that cell in coloum a. What best way to do this many thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks is there also way you can do it like loop wher it be sumthing like this
dim maxval as interger maxval = 0 then loop thought each cell and compaire the value of each sell with the value of maxval if it is great replace if not leave it. "Don Guillett" wrote: One way Sub findmaxoffset() msgbox Cells(Columns(2).Find(Application.Max(Columns(2))) .Row, 1) End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "millwalll" wrote in message ... Hi all, I have a spreadsheet with laods data in. In coloum b I have numbers, I want to find the higest number in that coloum. Once it has found this number I then want it to offset one cross to coloum a then give me msgbox saying the value of that cell in coloum a. What best way to do this many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding the first value that is less than zero | Excel Worksheet Functions | |||
Finding Same Row Value | Excel Programming | |||
finding the "end" | New Users to Excel | |||
Finding Value | Excel Worksheet Functions | |||
finding a value | Excel Programming |