Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm trying to find the cell address for the lowest number in a column. This does not seem to be working when the number is 0. Can someone please help me figure out what's wrong with this code. It works when there aren't any 0's in the column. Thanks in advance Trevor Function MinAddress(rng) Set rng = Columns(22) ' Sets variable equal to minimum value in the input range. MinNum = Application.Min(rng) ' Loop to check each cell in the input range to see if equals the ' MinNum variable. For Each cell In rng.Cells If cell = MinNum Then ' If the cell value equals the MinNum variable it ' returns the address to the function and exits the loop. MinAddress = cell.Address Exit For End If Next cell End Function -- Tre_cool ------------------------------------------------------------------------ Tre_cool's Profile: http://www.excelforum.com/member.php...o&userid=26416 View this thread: http://www.excelforum.com/showthread...hreadid=475552 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Cell address by value | Excel Discussion (Misc queries) | |||
Finding Minimum but if same number repeats in the range, then find | Excel Discussion (Misc queries) | |||
Finding a minimum value in a cell that is constantly changing. | Excel Worksheet Functions | |||
Finding a minimum value and selecting the cell containing this val | Excel Worksheet Functions | |||
Finding the minimum in a selected number of rows of the same colum | Excel Worksheet Functions |