Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Loop
I have data in I4:I18. If the value is greater than zero I would like to
check if the value in V & activerow (ex: V4) is greater than I & activerow. If so, do command and keep checking the remaining rows. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Loop
John,
Try this Sub sonic() For Each c In Range("I4:I18") If IsNumeric(c.Value) And c.Value 0 And c.Value c.Offset(, 13).Value Then 'Do something" End If Next End Sub Mike "John" wrote: I have data in I4:I18. If the value is greater than zero I would like to check if the value in V & activerow (ex: V4) is greater than I & activerow. If so, do command and keep checking the remaining rows. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Loop
Try
Sub Macro() For Each c In Range("I4:I18").Rows If Range("V" & c.Row) <= c.Value Then 'Do somthing. Number in V less than I End If Next End Sub If this post helps click Yes --------------- Jacob Skaria "John" wrote: I have data in I4:I18. If the value is greater than zero I would like to check if the value in V & activerow (ex: V4) is greater than I & activerow. If so, do command and keep checking the remaining rows. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Loop
I am getting the command run (the do something part) run 16 times... How do I
check that row once and then move to the next row? "Jacob Skaria" wrote: Try Sub Macro() For Each c In Range("I4:I18").Rows If Range("V" & c.Row) <= c.Value Then 'Do somthing. Number in V less than I End If Next End Sub If this post helps click Yes --------------- Jacob Skaria "John" wrote: I have data in I4:I18. If the value is greater than zero I would like to check if the value in V & activerow (ex: V4) is greater than I & activerow. If so, do command and keep checking the remaining rows. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Loop
nevermind got it...
"John" wrote: I am getting the command run (the do something part) run 16 times... How do I check that row once and then move to the next row? "Jacob Skaria" wrote: Try Sub Macro() For Each c In Range("I4:I18").Rows If Range("V" & c.Row) <= c.Value Then 'Do somthing. Number in V less than I End If Next End Sub If this post helps click Yes --------------- Jacob Skaria "John" wrote: I have data in I4:I18. If the value is greater than zero I would like to check if the value in V & activerow (ex: V4) is greater than I & activerow. If so, do command and keep checking the remaining rows. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Loop Help Please | Excel Programming | |||
Simple Loop Help Please | Excel Programming | |||
Simple loop? | Excel Programming | |||
Simple question on For...Next loop | Excel Programming | |||
Some help w/ simple loop, please? | Excel Programming |