VBA-使用InputBox过滤掉​​多个值

时间:2017-07-06 16:34:39

标签: vba excel-vba excel-2010 excel

我试图让我的代码过滤掉多个值,这样我就可以看到任何可能留在列表中的员工。当我输入一个名字(即" Smith")时,它的效果非常好,因为它确实从我的列表中取出了名称。但是,当我尝试输入另一个名字时(例如" White")," Smith" "怀特"回到了名单上。被过滤掉了。我想要过滤掉两个名字,以及我可能需要的任何其他名字。

MatrixXd P(3, 3);
P << 1, 2, 3, 4, 5, 6, 7, 8, 9;
MatrixXd U(3, 1);
U << 0, 1, 2;

PartialPivLU<MatrixXd> lu = PartialPivLU<MatrixXd>(P);
MatrixXd J = lu.matrixLU().triangularView<UpLoType::Upper>();
MatrixXd F = lu.matrixLU().triangularView<UpLoType::UnitLower>();
MatrixXd perm = lu.permutationP().transpose();
MatrixXd F1 = perm * F;

MatrixXd Jlamda = F.lu().solve(U);
MatrixXd l = J.lu().solve(Jlamda);

cout << perm << endl;
cout << endl;
cout << F1 << endl;

非常感谢任何提示,谢谢!

0 个答案:

没有答案