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: 72
Default VBA Simple question

I am looking to automate a cell comparison.

The code I have is as follows:

Public Sub assign()
Worksheets("Sheet3").Activate
Dim node As Integer
Dim xrow As Integer
node = 1
For xrow = 1 To 10000
If Range("b" & xrow).Value < 0 And Cells("b" & xrow).Value < Cells("b" &
xrow).Value Then
Range("a" & xrow).Value = 33
End If
Next
End Sub

I want to search through 10000 cells in column B and if the value is not 0,
and not equal to the previous cell, then enter "33". The figures are
arbitrary, but this is the task I need completed. Thanks for the 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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Question Brian Excel Discussion (Misc queries) 3 March 10th 06 10:12 AM
Simple Question cmk18[_12_] Excel Programming 1 August 19th 05 03:29 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 12:24 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"