Previous Column

T

Terry VanDuzee

Hello
How do I test the value in the previous column; using Activecell?

In my code, I activate a cell so that I can place a value in it. Using a Do
Until loop, I want to generate a number until the value is greater than the
number in the previous column (same row).

Thank you so much
Terry V
 
J

Jim Rech

Maybe somethin like:

Sub a()
With ActiveCell
While .Value < .Offset(0, -1).Value
.Value = .Value + 10
Wend
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top