Assistance with Excel macros
Closed
xOgrex
Posts
1
Registration date
Friday December 19, 2014
Status
Member
Last seen
December 19, 2014
-
Dec 19, 2014 at 08:09 AM
RayH - Dec 19, 2014 at 02:27 PM
RayH - Dec 19, 2014 at 02:27 PM
Related:
- Assistance with Excel macros
- Macros in excel download free - Download - Spreadsheets
- Excel marksheet - Guide
- Number to words in excel - Guide
- Excel apk for pc - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
1 response
You were missing an "ENDIF" .
The way this is set up it means that the 2nd IF THEN is ONLY evaluated if the 1st one does not meet the criteria.
Essentially it is doing this.
The way this is set up it means that the 2nd IF THEN is ONLY evaluated if the 1st one does not meet the criteria.
Essentially it is doing this.
Sub Show_on_Maint()
x = 2
'Sets the starting row
Do While Cells(x, 2) <> ""
'Continue to evaluate until a blank cell is reached
'Evaluates the cell in column Y or AC to determine if the value is less than or equal to 90
If Cells(x, 25) <= 90 Or Cells(x, 29) <= 90 Then
'Copies the row to the Maint Due sheet
Sheets("Sheet1").Rows(x).Copy Sheets("Sheet6").Range("A2")
End If
x = x + 1
Loop
End Sub