LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default .cells reference?

Hi I am trying to find when a value crosses above or below zero in a table
for multiple test objects... my code does not return any crosses... when
column "B" should find one

Sub Scorecross()
Sheets("Scores").Select
lastticker = Range("b2").End(xlToRight).Address
lstcol = Range("b2").End(xlToRight).Column
todayrow = Range("a2").End(xlDown).Row
For Each i In Sheets("Scores").Range("b2", lastticker)
If Cells(i.Column, todayrow) < 0 And Cells(i.Column, todayrow - 1) 0
Then
nx****ch = Sheets("watch list").Range("a4000").End(xlUp).Address
Sheets("watch list").Range(nx****ch).Offset(1, 0) =
Sheets("scores").Cells(i.Column, 2)
Sheets("watch list").Range(nx****ch).Offset(1, 1) =
Sheets("scores").Cells(i.Column, todayrow)
Sheets("watch list").Range(nx****ch).Offset(1, 2) = "Cross UP"
Sheets("watch list").Range(nx****ch).Offset(1, 3) =
Sheets("Scores").Range("a" & todayrow).Value
End If
If Cells(i.Column & todayrow) < 0 And Cells(i.Column & todayrow - 1) < 0
Then
nx****ch = Sheets("watch list").Range("a4000").End(xlUp).Address
Sheets("watch list").Range(nx****ch).Offset(1, 0) =
Sheets("scores").Cells(i.Column, 2)
Sheets("watch list").Range(nx****ch).Offset(1, 1) =
Sheets("scores").Cells(i.Column, todayrow)
Sheets("watch list").Range(nx****ch).Offset(1, 2) = "Cross DOWN"
Sheets("watch list").Range(nx****ch).Offset(1, 3) =
Sheets("Scores").Range("a" & todayrow).Value
End If
Next
'Call scoreEmail
Sheets("watch list").Select
End Sub


Thanks for any help!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
reference format Range(Cells(),Cells()) Stefi Excel Programming 5 December 16th 05 02:25 PM
Compare two cells from reference cells Mike K Excel Worksheet Functions 2 November 26th 05 02:07 PM
best way to get reference to all used cells sugargenius Excel Programming 2 November 11th 05 01:00 PM
How do I reference the last 3 cells in a row as cells are added Still Learning Excel Worksheet Functions 6 January 8th 05 05:10 PM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"