B
Bertha needs help
Ok this is the first macro i have ever written
So, i have two worksheets sheet 2 brings in data from another source. On
column D it brings in the name of the alarm that went off.
In Sheet "Bf4 alarms" column 1 i have a list of the 710 alarms that are
known to go off.
The problem is that sometimes new alarms that are not part of this list go
off.
So, im trying to write a macro that identifies these new alarms and places
them on Sheet 1 Column 2.
I really dont knoow how to do it. this is my idea.
Obviously it doesnt work cause i dont know what im doing and an error keeps
coming up but i dont know how to make it work.
Sub IdentNewAlarm()
x = ActiveCell.Row
y = x + 1
Do While Cells(x, 4).Value <> ""
Do While Cells(y, 4).Value <> ""
If (Cells(x, 4).Value = Sheets("BF4 AlarmsCells").Range("A:A")) Then
Sheets("BF4 AlarmsCells").Cells(1,2).value= cells(x,4))
Else
y = y + 1
End If
Loop
x = x + 1
y = x + 1
Loop
End Sub
So, i have two worksheets sheet 2 brings in data from another source. On
column D it brings in the name of the alarm that went off.
In Sheet "Bf4 alarms" column 1 i have a list of the 710 alarms that are
known to go off.
The problem is that sometimes new alarms that are not part of this list go
off.
So, im trying to write a macro that identifies these new alarms and places
them on Sheet 1 Column 2.
I really dont knoow how to do it. this is my idea.
Obviously it doesnt work cause i dont know what im doing and an error keeps
coming up but i dont know how to make it work.
Sub IdentNewAlarm()
x = ActiveCell.Row
y = x + 1
Do While Cells(x, 4).Value <> ""
Do While Cells(y, 4).Value <> ""
If (Cells(x, 4).Value = Sheets("BF4 AlarmsCells").Range("A:A")) Then
Sheets("BF4 AlarmsCells").Cells(1,2).value= cells(x,4))
Else
y = y + 1
End If
Loop
x = x + 1
y = x + 1
Loop
End Sub