Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
A formula delivers a result 0 or 1 in certain conditions in the cells in a
coluumn. I need to start scanning from row 1 to bypass the initial 0 value cells to reach the first positive value in the column. How do I do it? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
Hi,
A bit thin on information but maybe this will get you started Sub sonic() lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row Set myrange = Range("A1:A" & lastrow) For Each c In myrange If c.Value < 0 Then 'do something MsgBox c.Address End If Next End Sub Mike "a m spock" wrote: A formula delivers a result 0 or 1 in certain conditions in the cells in a coluumn. I need to start scanning from row 1 to bypass the initial 0 value cells to reach the first positive value in the column. How do I do it? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
See reply in your other post. Why did you do this???
in a columnGet to first positive value e: Bypas Nil Values -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... A formula delivers a result 0 or 1 in certain conditions in the cells in a coluumn. I need to start scanning from row 1 to bypass the initial 0 value cells to reach the first positive value in the column. How do I do it? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
the data in the computed column on sales completed is something like this. the data is dynamic and changes as each transaction is added to the workshet. i need a macro which will, starting from anywhere on the worksheet take the cursor to the cell with the last positive value i.e. 800,000 Trades Completed 0 200,000 1,000 1,000,000 0 0 0 0 800,000 0 0 0 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
One way
Sub gotolastpostitivevalue() mc = "f" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) 0 Then Cells(i, mc).Select Exit Sub End If Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... the data in the computed column on sales completed is something like this. the data is dynamic and changes as each transaction is added to the workshet. i need a macro which will, starting from anywhere on the worksheet take the cursor to the cell with the last positive value i.e. 800,000 Trades Completed 0 200,000 1,000 1,000,000 0 0 0 0 800,000 0 0 0 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
many thanks. the macro works but
it has selected a column at random where it finds the last positive value evry time. how do i specify the column where i want the avtivity to happen? Pardon my ignorance. "Don Guillett" wrote: One way Sub gotolastpostitivevalue() mc = "f" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) 0 Then Cells(i, mc).Select Exit Sub End If Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... the data in the computed column on sales completed is something like this. the data is dynamic and changes as each transaction is added to the workshet. i need a macro which will, starting from anywhere on the worksheet take the cursor to the cell with the last positive value i.e. 800,000 Trades Completed 0 200,000 1,000 1,000,000 0 0 0 0 800,000 0 0 0 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
sorry fro prev post. just figured it out.
thanks again!!! "Don Guillett" wrote: One way Sub gotolastpostitivevalue() mc = "f" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) 0 Then Cells(i, mc).Select Exit Sub End If Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... the data in the computed column on sales completed is something like this. the data is dynamic and changes as each transaction is added to the workshet. i need a macro which will, starting from anywhere on the worksheet take the cursor to the cell with the last positive value i.e. 800,000 Trades Completed 0 200,000 1,000 1,000,000 0 0 0 0 800,000 0 0 0 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bypas Nil Values
don,
you can't imagine how grateful i am. am "Don Guillett" wrote: Just in case. mc="f" refers to column F. change to suit. -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... sorry fro prev post. just figured it out. thanks again!!! "Don Guillett" wrote: One way Sub gotolastpostitivevalue() mc = "f" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) 0 Then Cells(i, mc).Select Exit Sub End If Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "a m spock" wrote in message ... the data in the computed column on sales completed is something like this. the data is dynamic and changes as each transaction is added to the workshet. i need a macro which will, starting from anywhere on the worksheet take the cursor to the cell with the last positive value i.e. 800,000 Trades Completed 0 200,000 1,000 1,000,000 0 0 0 0 800,000 0 0 0 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 doesnt show Y-axis values when the values are small. | Charts and Charting in Excel | |||
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row | Excel Worksheet Functions | |||
Why does this code remove Duplicate Values, by showing only 1, but it does NOT show Unique values for some reason ? | Excel Programming | |||
Search/Filter to find values in another range based on two cell values | Excel Programming | |||
Predict Y-values on new X-values based on other actual X and Y values? | Excel Programming |