View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
john_t_h[_9_] john_t_h[_9_] is offline
external usenet poster
 
Posts: 1
Default select column cell in same row as loop result?

~× wrote:
*John

one way.

Tony

Sub eee()
Range("b1").Select
While Not IsEmpty(ActiveCell)
Select Case ActiveCell.Value
Case 115297
ActiveCell.Offset(0, -1).Value = 22
ActiveCell.Offset(0, 7).Value = 23

Case 276543
ActiveCell.Offset(0, -1).Value = 27
ActiveCell.Offset(0, 7).Value = 93
End Select
ActiveCell.Offset(1, 0).Select
Wend
End Sub *


I have empty cells in the column. Won't this stop when it reaches the
first empty cell?

I assume the offset this is counting columns from the cell being
searched?


---
Message posted from http://www.ExcelForum.com/