The MATLAB approach:
T = readtable('LOOP Events.xlsx','Range','D:K');
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
T = rmmissing(T) % remove empty rows
T = 186×8 table
OperatingMode LOOPCategory LOOPClass SwitchyardRestorationTime PotentialBusRecoveryTime ActualBusRestorationTime Cause SpecificCause
_____________ ____________ ______________ _________________________ ________________________ ________________________ _________ _______________
{'Critical'} {'SC'} {'LOOP-IE-I' } 15 28 28 {'HES' } {'Maintenance'}
{'Critical'} {'SC'} {'LOOP-IE-I' } 0 4 4 {'Equip'} {'Breaker' }
{'Shutdown'} {'SC'} {'LOOP-SD' } 15 28 28 {'HES' } {'Maintenance'}
{'Shutdown'} {'SC'} {'LOOP-SD' } 77 82 82 {'Equip'} {'Other' }
{'Shutdown'} {'SC'} {'LOOP-SD' } 62 63 63 {'Equip'} {'Transformer'}
{'Critical'} {'SC'} {'LOOP-IE-I' } 95 118 213 {'Equip'} {'Breaker' }
{'Shutdown'} {'WR'} {'LOOP-SD' } 528 533 533 {'SEE' } {'High Winds' }
{'Critical'} {'SC'} {'LOOP-IE-I' } 1 2 3097 {'Equip'} {'Relay' }
{'Critical'} {'WR'} {'LOOP-IE-I' } 1 16 7414 {'EEE' } {'Tornado' }
{'Critical'} {'WR'} {'LOOP-IE-I' } 1 16 7414 {'EEE' } {'Tornado' }
{'Shutdown'} {'SC'} {'LOOP-SD' } 39 44 44 {'Equip'} {'Transformer'}
{'Critical'} {'WR'} {'LOOP-IE-I' } 1 16 7414 {'EEE' } {'Tornado' }
{'Critical'} {'SC'} {'LOOP-IE-I' } 86 91 101 {'Equip'} {'Relay' }
{'Critical'} {'PC'} {'LOOP-IE-NC'} 60 62 781 {'HE' } {'Switching' }
{'Shutdown'} {'WR'} {'LOOP-SD' } 1120 1125 1508 {'SEE' } {'Salt Spray' }
{'Shutdown'} {'SC'} {'LOOP-SD' } 15 30 136 {'HES' } {'Testing' }
X = matches(T.OperatingMode,'Critical') & matches(T.Cause,{'SEE','HEE'});
Select_Cause = T.LOOPClass(X)
Select_Cause = 19×1 cell array
{'LOOP-IE-NC'}
{'LOOP-IE-NC'}
{'LOOP-IE-NC'}
{'LOOP-IE-NC'}
{'LOOP-IE-NC'}
{'LOOP-IE-I' }
{'LOOP-IE-NC'}
{'LOOP-IE-NC'}
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }
{'LOOP-IE-I' }