arrays and labeling
Ok,
I tried my luck and I've got it up to the point where I need to paste the
data into excel. What I'm tracking with the Watch on arrLabel is not
matching what I'm getting when pasted into excel.
ReDim arrLabel(1 To LastRow) As Variant
ReDim arrFUEGO(1 To LastRow) As Variant
ReDim arrOxygen(1 To LastRow) As Variant
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For j = 1 To LastRow
If Round(arrFUEGO(j, 1), 1) = 1 Then
If arrOxygen(j, 1) 0 Then
arrLabel(j) = "Mode 4"
Else
arrLabel(j) = "Mode 1"
End If
Else
If arrOxygen(j, 1) 0 Then
arrLabel(j) = "Mode 3"
Else
arrLabel(j) = "Mode 2"
End If
End If
Next
ActiveSheet.Range("X8:X" & LastRow).Value = arrLabel
What's wrong with that last line?
Thanks!
Matt
"Matt S" wrote:
Hi all,
I have 50 hours of data, second by second in excel. I am trying to label
each point as 1 of 4 modes based on certain criteria. My 'Oxygen' is a
column that says if my oxygen is on or not. My UEGO is another column that
is either at 1 or 0.9. These are the criteria for the modes.
Mode 1 (~10sec):
Oxygen = 0
UEGO ~ 1
Mode 2 (~10 sec):
Oxygen = 0
UEGO ~ 0.9
Mode 3 (~5 sec):
Oxygen = 1
UEGO ~ 0.9
Mode 4 (~10 sec):
Oxygen = 1
UEGO ~1
I'd like to use arrays to label the data to make this process fast. My
array knowlege is a little weak.
Any help would be greatly appreciated!
Thanks!
Matt
|