Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm new to programming and am trying to create code to read a row
cells 5 - 24 and determine what cell has a 0 value (The row is always sorted by descending values). So I want to read each cell starting with C5 through the end of the range C24, and stop when it gets the first 0 value. Here is my code so far. I don't get any errors, but it deos not seem to be doing anything. All Help is appreceated! Sub CreateNewSortRange() Dim StartRange As Variant Dim EndRange As Variant Dim EndRangeAdress As Variant Sheets("TestRange").Activate Range("C5:c24").Select Row = 3 For Col = 5 To 24 With Worksheets("TestRange").Cells(Row, Col) If ActiveCell.Value 0 Then EndRangeAddress = ActiveCell.AddressLocal If ActiveCell.Value = 0 Then MsgBox "Range Start= " & StartRange MsgBox "Range End= " & EndRangeAddress End If End If End With Next Col |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determine the distance between 2 cells in a column | Excel Programming | |||
A way to Determine visible cells on the page | Excel Programming | |||
What Excel function would you use to determine how many cells in a | Excel Discussion (Misc queries) | |||
Determine whether a value is in a range of cells | Excel Discussion (Misc queries) | |||
Determine Selected Cells | Excel Programming |