[英]Excel Query - how to apply an IF statement to the last cell with a value in a row
In excel, I am creating a tracker and I want to apply a status ie on track or overdue depending on the last cell in a row that has a value.在 excel 中,我正在创建一个跟踪器,我想根据行中具有值的最后一个单元格应用一个状态,即在跟踪中或过期。
so in the first column stage 1, if a user inputs a value between 1-3, it will show as on track but if a user inputs 4 it will show overdue.因此,在第一列阶段 1 中,如果用户输入 1-3 之间的值,它将显示为正常,但如果用户输入 4,它将显示过期。 In the next column stage 2, a user should input a value between 4-8 and but if they input 6 the status should show as on track (and disregard the previous overdue).在下一列第 2 阶段,用户应输入一个介于 4-8 之间的值,但如果他们输入 6,则状态应显示为正常(并忽略先前的逾期)。
There will be multiple rows, each at a different stage in the process, so i would like the formula to check in each row where the last value is, check that against the appropriate range and return the appropriate status.会有多行,每一行都处于流程的不同阶段,所以我希望公式检查最后一个值所在的每一行,检查适当的范围并返回适当的状态。
Hope this makes sense!希望这是有道理的!
*Update screengrab attached. *附上更新的屏幕截图。 The numbers in the rows are entered by a user compared to the range in the top row.行中的数字由用户输入,与顶行中的范围进行比较。 ie Day 4, when it should be between days 1 and 3.即第 4 天,应该在第 1 天和第 3 天之间。
Check if the below cell is empty for the entire row, then it will be true only in the last cell.检查下面的单元格是否对于整行都是空的,那么它只会在最后一个单元格中为真。
=IF(A2="",A1,"last cell")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.