Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...(but test it!):
Option Explicit Sub testme() Dim wks As Worksheet Dim OpRow As Long Dim LastRow As Long 'just because I like to use a variable Set wks = ActiveSheet With wks LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row 'start at the bottom and work up 'stopping at row 3 so that row 2 isn't compared to row 1 (the header row) For OpRow = LastRow To 3 Step -1 If Trim(.Cells(OpRow, "A").Value) = "" Then 'do nothing Else If Trim(.Cells(OpRow - 1, "A").Value) = "" Then 'do nothing Else .Cells(OpRow, "A").Value = "Closed" End If End If Next OpRow End With End Sub On 05/17/2010 11:32, TGalin wrote: For Operation = 2 To Cells(Rows.Count, "B").End(xlUp).Row If Len(Application.Trim(Cells(Operation, "A")))< 1 Then Cells(Operation, "A") = "Examine" Next Operation |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select all rows till last row with value in Column A and CopyPaste | Excel Programming | |||
Delete rows if AF and AY empty but F has information | Excel Worksheet Functions | |||
CopyPaste | Excel Programming | |||
FormatConditions appears to kill copypaste | Excel Programming | |||
VBA code need help on CopyPaste | Excel Programming |