I am having trouble figuring out how to write code that will go through my array and perform actions based on a cells value.
I have an array set to a dynamic range and I am looking to have it parse the rows and look at the date value in the second column of the range and perform actions when the date is < the current date.
My code is
Trying to play around with variables to get it to output the values, but the above is just printing the last value in the first column 12 times. I don't fully understand the Ubound argument either. If anyone could give me the framework for having the loop look at the value in the second column of the 12 column wide array and taking action that would be greatly appreciated!
I have an array set to a dynamic range and I am looking to have it parse the rows and look at the date value in the second column of the range and perform actions when the date is < the current date.
My code is
VBA Code:
Dim ordrList As Range
Dim i As Integer
Dim j As Integer
Dim x As Integer
Dim row As Range
i = Sheet3.Range("T1").value 'number of lines (orders) from import data
Set ordrList = Sheet3.Range("outdata")
myarray = Sheet3.Range("outdata")
For j = 1 To i
For x = 1 To UBound(myarray, 2)
Debug.Print (myarray(i, j))
Next x
Next j
Trying to play around with variables to get it to output the values, but the above is just printing the last value in the first column 12 times. I don't fully understand the Ubound argument either. If anyone could give me the framework for having the loop look at the value in the second column of the 12 column wide array and taking action that would be greatly appreciated!