I'm creating a spreadsheet for task completion and using the "data bar" function in excel. The Data bar is set for 1-100, with only the bar showing (no numbers). I would like the next cell over to reflect the status of the bar-like so:
我正在创建一个电子表格来完成任务并使用excel中的“数据栏”功能。数据栏设置为1-100,只显示栏(无数字)。我想下一个单元格来反映条状的状态,所以:
BLANK CELL - "Not Started"
BLANK CELL - “未开始”
1-99 (shown on data bar) - "In Progress"
1-99(显示在数据栏上) - “进行中”
100 (shown on data bar) - "Completed"
100(显示在数据栏上) - “已完成”
to make this happen, I tried
为了实现这一目标,我试过了
= IF(D3=" ","NOT STARTED", IF(AND(D3>=1,D3<=100),"IN PROGRESS",IF(D3=100,"COMPLETED")))
but all I get for any numeric value is "IN PROGRESS" and if the cell is blank, "FALSE"
但我获得的任何数值都是“进行中”,如果单元格为空,则为“FALSE”
I'm new to coding so any help appreciated. What am I doing wrong, or what code might work better?
我是编码的新手,所以任何帮助表示赞赏。我做错了什么,或者哪些代码可能更好?
1 个解决方案
#1
0
remove the space from the D3=" "
从D3 =“”中删除空格
And you do not need the third IF.
而且你不需要第三个IF。
Also since you put D3<=100 IN PROGRESS
will fire even if D3 is 100
此外,即使D3为100,D3 <= 100 IN PROGRESS也会激活
=IF(D3="","NOT STARTED", IF(AND(D3>=1,D3<100),"IN PROGRESS","COMPLETED"))
#1
0
remove the space from the D3=" "
从D3 =“”中删除空格
And you do not need the third IF.
而且你不需要第三个IF。
Also since you put D3<=100 IN PROGRESS
will fire even if D3 is 100
此外,即使D3为100,D3 <= 100 IN PROGRESS也会激活
=IF(D3="","NOT STARTED", IF(AND(D3>=1,D3<100),"IN PROGRESS","COMPLETED"))