PC Review


Reply
Thread Tools Rate Thread

Bypas Nil Values

 
 
a m spock
Guest
Posts: n/a
 
      9th Sep 2008
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?

 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      9th Sep 2008
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?
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      9th Sep 2008
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
(E-Mail Removed)
"a m spock" <(E-Mail Removed)> wrote in message
news:B2B9900C-3788-4643-B758-(E-Mail Removed)...
>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?
>


 
Reply With Quote
 
a m spock
Guest
Posts: n/a
 
      10th Sep 2008

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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      10th Sep 2008
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
(E-Mail Removed)
"a m spock" <(E-Mail Removed)> wrote in message
news:73EA0E72-E853-4977-A28D-(E-Mail Removed)...
>
> 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 With Quote
 
a m spock
Guest
Posts: n/a
 
      10th Sep 2008
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
> (E-Mail Removed)
> "a m spock" <(E-Mail Removed)> wrote in message
> news:73EA0E72-E853-4977-A28D-(E-Mail Removed)...
> >
> > 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 With Quote
 
a m spock
Guest
Posts: n/a
 
      10th Sep 2008
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
> (E-Mail Removed)
> "a m spock" <(E-Mail Removed)> wrote in message
> news:73EA0E72-E853-4977-A28D-(E-Mail Removed)...
> >
> > 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      10th Sep 2008
Just in case.
mc="f" refers to column F. change to suit.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"a m spock" <(E-Mail Removed)> wrote in message
news:8FB8249A-0E11-4D3E-B0E0-(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>> "a m spock" <(E-Mail Removed)> wrote in message
>> news:73EA0E72-E853-4977-A28D-(E-Mail Removed)...
>> >
>> > 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 With Quote
 
a m spock
Guest
Posts: n/a
 
      11th Sep 2008
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
> (E-Mail Removed)
> "a m spock" <(E-Mail Removed)> wrote in message
> news:8FB8249A-0E11-4D3E-B0E0-(E-Mail Removed)...
> > 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
> >> (E-Mail Removed)
> >> "a m spock" <(E-Mail Removed)> wrote in message
> >> news:73EA0E72-E853-4977-A28D-(E-Mail Removed)...
> >> >
> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find matching values, copy/paste values as well as values in ColA ryguy7272 Microsoft Excel Programming 2 28th Sep 2009 06:20 AM
Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values divya Microsoft Word Document Management 4 6th Jul 2006 01:08 PM
Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values divya Microsoft Word Document Management 0 6th Jul 2006 11:47 AM
seperating upcase values from lower case values while importing data from access b_mehendale Microsoft Excel Programming 0 9th Jun 2006 08:21 PM
Predict Y-values on new X-values based on other actual X and Y values? NorTor Microsoft Excel Programming 2 10th Aug 2003 03:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:40 PM.