简体   繁体   English

Excel 查询 - 如何将 IF 语句应用于具有连续值的最后一个单元格

[英]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 天之间。

enter image description here在此处输入图像描述

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")

Add this formula at the last.最后加上这个公式。 Based on your example, i have pasted it in Column D根据您的示例,我已将其粘贴在 D 列中

=LOOKUP(9.99E+307,A2:C2)

See Image看图片在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel VBA:如何将值粘贴到表的最后一行的第一个单元格中? - Excel VBA: How to paste a value in the first Cell of the last row of a table? 用最后一行单元格值填充Excel MsgBox - Populate Excel MsgBox with last row cell value 如何在 Power Query 的 SELECT 语句中使用 Excel 单元格值作为变量? - How to use an Excel cell value as a variable in a SELECT statement in Power Query? Excel格式/突出显示基于最后日期和相等单元格值的行 - Excel formatting/Highlight row based on the last date and equal cell value 在Excel中向多行单元格的最后一行添加值 - Add a value to last row of multiple line cell in excel 如果第一个和最后一个单元格值为空或空白,如何读取 Excel 工作表行的每个单元格的值? - How to read each and every cell's value of the row of Excel sheet if 1st and last cell value is Null or Blank? Google Spreadsheet / EXCEL]如何获取行中的最后一个值? 使用A1作为第一个单元格? - Google Spreadsheet/EXCEL] How do I get the last value in a Row? Using A1 as the first cell? 如何根据单元格值在Excel中删除行? - How to remove a row in Excel based on cell value? Excel:如何在一行中查找最后一个“有效”值 - Excel: How to find last “valid” value in a row Excel - 如何使用单元格的值作为另一个单元格的行值? - Excel - How to use the value of a cell as the row value of another cell?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM