简体   繁体   English

如果下拉列表在另一个单元格中更改,如何在表格中更改文本颜色

[英]How to make text color to change in a table when drop down list changes in another cell

I have an Excel spreadsheet which I need help with. 我有一个Excel电子表格,我需要帮助。 Characteristics: 特点:

  • I have a drop down menu in column C. 我在C栏中有一个下拉菜单。
  • I have a dates from column F to J (5 days). 我有一个从F到J的日期(5天)。
  • I have 15 rows (names) from row 8 to 22. 我从第8行到第22行有15行(名称)。
  • F to J is to determine staff productive for a day/week. F到J是确定员工每天/每周的工作效率。

I need F8 to J22, to change text colour to green when 15 or above is entered. 我需要F8到J22,当输入15或更高时,将文本颜色更改为绿色。 If below 15 I need the text to be orange depending on what is selected in the drop down menu in C. 如果低于15,我需要文本为橙色,具体取决于C中下拉菜单中选择的内容。

So If I have item "STU ENT" selected in C, I need text in F8 to J22 to be green when 15 or above is entered. 因此,如果我在C中选择了“STU ENT”项目,当输入15或更高时,我需要F8到J22中的文本为绿色。 If below I need orange. 如果下面我需要橙色。

If "STU EXP" is selected in C, I need text in F8 to J22 to be green when above 8, orange when below. 如果在C中选择“STU EXP”,我需要F8到J22中的文本在8以上时为绿色,在下面时为橙色。

I can get it to work with conditional formatting but only when 15 is entered for all drop down menu items, but I need this to be different for each selection in the drop down list... 我可以使用条件格式化,但只有当所有下拉菜单项都输入15时,但我需要对下拉列表中的每个选项都有所不同...

Help would be so great and save me so much time. 帮助太棒了,给我这么多时间。

Thanks in advance. 提前致谢。

screenshot 截图

I've tried formulas in conditional formatting, but can't get it to meet my what i need. 我已经在条件格式中尝试了公式,但无法让它满足我的需要。

I have looked at VBA coding, but don't want to run macros. 我看过VBA编码,但不想运行宏。

You should be able to do that with Conditional formatting. 你应该可以使用条件格式来做到这一点。

Create a new cell with the formula (for example M1): 使用公式创建一个新单元格(例如M1):

=IF(C1="STU ENT",15,8)

I understand there are only 2 options for Column C ("STU ENT" and "STU EXP") and that the value is only in 1 cell that changes from one another. 我知道C列只有两个选项(“STU ENT”和“STU EXP”),并且该值仅在1个单元格中相互变化。

Then do the conditional formatting referring to M1 cell instead of a value. 然后执行引用M1单元格而不是值的条件格式。

暂无
暂无

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

相关问题 Excel,下拉列表更改另一个单元格的内容,而不是公式化 - Excel, drop-down list changes contents of another cell, not formulaic 根据相邻单元格中下拉列表中的选择更改单元格的填充颜色 - Change the fill color of a cell based on a selection from a Drop Down List in an adjacent cell 默认文本更改时,Excel更改单元格颜色 - Excel Change Cell Color when Default Text Changes 如何根据另一个单元格中的部分文本更改一个单元格的颜色 - How to change the color of one cell based on partial text in another cell Excel数据透视表过滤器-如何使一个过滤器下拉菜单依赖于另一个下拉菜单? - Excel Pivot Table Filters - How to Make One Filter Drop Down Dependent on Another Drop Down? 当我在另一个单元格中选择一个下拉项时,如何使Excel中的单元格将数字范围随机化? - How do I make it so cells in excel randomize a range of numbers when I select a drop down item in another cell? Excel - 下拉菜单会随着另一个单元格中的某些输入而改变 - Excel - drop down menu changes with certain input in another cell 清除下拉单元格内容取决于另一个单元格值更改 - Clear drop down cell content depend on another cell value change 如何在单元格值更改时交替表格中的行颜色? - How to alternate row color in a table when cell value changes? Worksheet_change事件-从下拉列表中选择时更改所有工作表上的单元格值 - Worksheet_change event - change cell value on all sheets when selecting from drop-down list
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM