My code below helps me to fill in blank cells with N/A from range A18:Y18. However, I'm not sure how to run the same code for the next rows (ie A19:Y19, A20:Y20).
My usual process is to enter the raw data into row 18 first, then run this VBA code to fill in blank cells with N/A. Next, I will enter another set of data into row 19, and fill in the blanks with N/A. I want to repeat this process for each row. How should I edit my code?
My usual process is to enter the raw data into row 18 first, then run this VBA code to fill in blank cells with N/A. Next, I will enter another set of data into row 19, and fill in the blanks with N/A. I want to repeat this process for each row. How should I edit my code?
VBA Code:
Sub FillEmptyCells()
'Forces each cell to show N/A if Empty
On Error Resume Next
Dim c As Range
Dim rng As Range
Set rng = Range("A18:Y18")
For Each c In rng
If IsEmpty(c) Then
c = "N/A"
End If
Next c
End Sub