How to use an IF statement to pull cells only with >= XXXX

南楼画角 提交于 2021-01-29 08:32:29

问题


I'm trying to look at the number of users who are on screens larger than 1400. I have my Excel sheet, and tried doing an IF statement, but because of the "x" in the middle, it's not working properly and is instead just pulling all of the cells, even the ones with screen sizes less than 1400. I've attached my formula and data example for reference. I've also tried putting a space after the fourth integer to separate things that way, but that also goofs things up since there are some screen sizes with only three numbers.

This is my formula: =IF(A2>=1400,A2,"No")


回答1:


The values in Column A are strings. A string will always be larger than a number to Excel. You need to parse the string to pull the first number:

=IF(--LEFT(A2,SEARCH("x",A2&"x")-1)>1400,A2,"No")


来源:https://stackoverflow.com/questions/65587439/how-to-use-an-if-statement-to-pull-cells-only-with-xxxx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!