I am trying to write a macro that when properly working, uses the information inside of an array to recognize certain columns and eliminates them. I already have the part where a certain range in Sheet 3, (C2 to D37) is placed in the array, and I have the debug print part to test if the array was storing the right information.
This is the code:
<code>Sub EraseTheColumns()
Dim arr As Variant
arr = Sheet3.Range("C2:D37").CurrentRegion
Dim i As Long
For i = LBound(arr) To UBound(arr)
Debug.Print arr(i + 1, 3), arr(i + 1, 4)
Next i
End Sub
</code>
<code>Sub EraseTheColumns()
Dim arr As Variant
arr = Sheet3.Range("C2:D37").CurrentRegion
Dim i As Long
For i = LBound(arr) To UBound(arr)
Debug.Print arr(i + 1, 3), arr(i + 1, 4)
Next i
End Sub
</code>
Sub EraseTheColumns()
Dim arr As Variant
arr = Sheet3.Range("C2:D37").CurrentRegion
Dim i As Long
For i = LBound(arr) To UBound(arr)
Debug.Print arr(i + 1, 3), arr(i + 1, 4)
Next i
End Sub
I need to find a way for the macro to go through the array and detets which columns are blank. If they are, we are to eliminate them from the other spreadsheet called ‘CleanDATA’