willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 886
- Office Version
- 365
- Platform
- Windows
Hello,
I need help with a section of the below code. Basically the area I am having trouble with is checking if column A (Date In) has any blanks and if so proceed with the below code to replace the blanks with a formula. If there are no blanks then skip to the formatting section.
Any help sorting this out would be greatly appreciated!
I need help with a section of the below code. Basically the area I am having trouble with is checking if column A (Date In) has any blanks and if so proceed with the below code to replace the blanks with a formula. If there are no blanks then skip to the formatting section.
Any help sorting this out would be greatly appreciated!
VBA Code:
Sheets("Flow of Repair").Select
If IsEmpty Range("FoR[Date In]") = True Then
x = Range("A" & Rows.Count).End(xlUp).Row
If x > 1 Then
With Range("A2:A" & x).SpecialCells(xlCellTypeBlanks)
.FormulaR1C1 = "=[@[Date Out]]"
End With
End If
Else
Range("FoR[Station Time (Days)]").Select
With Selection
.NumberFormat = "0"
.Value = .Value
End With
Range("S1").Select
End If
Application.ScreenUpdating = True
'
End Sub