OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Thanks in advance, and I will let you know what final result works.
Objective: Within the same sheet if column J entry >= 10,000, Then Column K = "Yes", Else Column K = "No". The number of rows in the worksheet will vary when I use this sheet so I want to make it find the last row.
Sub Value()
Worksheets("Sheet1").Activate
Dim LastRow1000 As Long
LastRow1000 = ThisWorkbook.Worksheets("Shee1").Cells(Rows.Count, 1).End(xlUp).Row
erow = Worksheets("Sheet1").Columns.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
For i = 2 To LastRow1000
If Worksheets("Sheet1").Columns.Cells(erow, 10) >= 10000 Then
Worksheets("Sheet1").Columns.Cells(erow, 11) = "Yes"
Else
Worksheets("Sheet1").Columns.Cells(erow, 11) = "No"
End If
Next i
End Sub
Objective: Within the same sheet if column J entry >= 10,000, Then Column K = "Yes", Else Column K = "No". The number of rows in the worksheet will vary when I use this sheet so I want to make it find the last row.
Sub Value()
Worksheets("Sheet1").Activate
Dim LastRow1000 As Long
LastRow1000 = ThisWorkbook.Worksheets("Shee1").Cells(Rows.Count, 1).End(xlUp).Row
erow = Worksheets("Sheet1").Columns.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
For i = 2 To LastRow1000
If Worksheets("Sheet1").Columns.Cells(erow, 10) >= 10000 Then
Worksheets("Sheet1").Columns.Cells(erow, 11) = "Yes"
Else
Worksheets("Sheet1").Columns.Cells(erow, 11) = "No"
End If
Next i
End Sub