Compare a column in two different excel-sheet
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I would like to have an idea on how to compare a column in two different excel sheets.
ex,
sheet 1 column A Sheet 2 column A
5 4.4
5 4.6
5 3
5 7
What i want is to find the columns that have differences in numbers between the two sheets and if column A in sheet 2 is +/- 1 of column A in sheet 1 then give an output of "good"
if more that +/-1 give an output "bad"
Thanks,
0 Kommentare
Antworten (1)
dpb
am 27 Jul. 2021
Just read both sheets --
CODES=categorical({'bad','good'}).'; % the output categories
A1=readmatrix('WorkbookFileName.xlsx','Sheet',1);
A2=readmatrix('WorkbookFileName.xlsx','Sheet',2);
isOK=CODES((abs(A2-A1)<=1)+1);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!