ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Previous Column (https://www.excelbanter.com/excel-programming/273207-previous-column.html)

Terry VanDuzee

Previous Column
 
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



Jim Rech

Previous Column
 
Maybe somethin like:

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


--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com