gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
The Code doesn't like: If Sheets("TRAVEL INFORMATION").Cells(p, 3).Value <> """"
I want it to create a tab if that cell is not null. Not sure why it doesn't like this
I want it to create a tab if that cell is not null. Not sure why it doesn't like this
Code:
Sub CreateTripTab()
'
Dim p As Integer
Dim LastRow As Long
'
With Sheets("TRAVEL INFORMATION")
LastRow = .Cells(.Rows.Count, 3).End(xlUp).Row
End With
'
Sheets("TRIP_TEMP").Visible = True
'
For p = 4 To LastRow
'
If Sheets("TRAVEL INFORMATION").Cells(p, 3).Value <> """"
Sheets("TRIP_TEMP").Activate
Sheets("TRIP_TEMP").Copy After:=Worksheets(Worksheets.Count)
ActiveSheet.Cells(2, 2).Value = Sheets("TRAVEL INFORMATION").Cells(p, 3).Value
'
Name_Tab
'
Else
'
End If
'
Next p
'
Calculate
Sheets("TRAVEL INFORMATION").Select
'
End Sub