[英]Force the user to input value in cell based on another cells value
I'm currently working on the following excel workbook that is to be used for recording test cases: 我目前正在研究以下用于记录测试用例的excel工作簿:
If the user enters fel
in the F column, it will color it red. 如果用户在F列中输入
fel
,则会将其着色为红色。 Fel
means fault
" (in swedish) so I want to force the tester to register this error in the bug tracking system whenever one of the test-cases fails. The column I should contain which ID to this error in the bug tracking system. So what I'm trying to achieve is: Fel
表示fault
“(用瑞典语),所以我想在任何一种测试用例失败时都强制测试人员在错误跟踪系统中注册此错误。列I应该在错误跟踪系统中包含该错误的ID。我想要实现的是:
If the tester have entered fel
in the column F, it should force or make the tester aware of that no ID have been entered in the I column. 如果测试人员已在F列中输入了
fel
,则应强制或使测试人员知道在I列中未输入ID。 One idea is to color the corresponding I cell red if the F cell contains fel
and the I cell is empty, and when the tester enters something in the I cell the red color goes away. 一种想法是,如果F单元包含
fel
并且I单元为空,则将相应的I单元fel
红色,并且当测试人员在I单元中输入某些东西时,红色消失。
This is what I've done so far: 到目前为止,这是我所做的:
=IF(AND(F5="Fel",I5=ISEMPTY(TRUE)),)
which I use with conditional formatting but I'm unable to get it to work. 我将其与条件格式一起使用,但无法正常使用。 Also the cell values are hard coded, how could i make the condition be valid for a certain column with a corresponding row's cell.
而且单元格值是硬编码的,我如何才能使条件对于具有相应行单元格的特定列有效。
Also, I'm open to suggestions if there is a better way then to just color that cell red to make the user aware of that he needs to enter something in the I column 另外,如果有更好的方法,那么我也愿意提出建议,只需将该单元格涂成红色即可使用户意识到他需要在I列中输入内容
I am taking the example of Cells F1:F10
. 我以单元格
F1:F10
为例。 Please amend as applicable. 请酌情修改。
There is no formula as ISEMPTY
. 没有
ISEMPTY
公式。 Use ISBLANK
使用
ISBLANK
Use this formula 使用这个公式
=AND($F1="Fel",ISBLANK($I1))
To ensure that it works for all cells in that range ( F1:F10
) use $
for the column only thereby making it constant and the row a variable 为了确保它适用于该范围内的所有单元格(
F1:F10
),请仅对列使用$
,从而使其保持恒定,而将行变为变量
Screenshot 屏幕截图
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.