Compare a column in two different excel-sheet
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
dpb
2021 年 7 月 27 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!