简体   繁体   English

Excel公式(如果单元格的后8个字符大于…)

[英]Excel Formula (If last 8 characters of cell are greater than…)

I need to find a formula for Excel (eventually will be a string in C#) that looks at the last 8 characters in a cell (last 8 of 17) and displays a result if those 8 numbers are greater than eg 11111111. 我需要找到一个Excel公式(最终将是C#中的字符串),该公式将查看单元格中的最后8个字符(17个中的最后8个),如果这8个数字大于例如11111111,则显示结果。

So if A1 contains XXXXXXXXX11111112 B1 would show the contents of A1, If A1 contains XXXXXXXXX11100009 B1 would show nothing. 因此,如果A1包含XXXXXXXXX11111112,则B1将显示A1的内容,如果A1包含XXXXXXXXX11100009,则B1将不显示任何内容。

=IF(VALUE(RIGHT(A1,8))>11111111,A1,"")

this? 这个?

=IF(AND(VALUE(RIGHT(A1,8))>11111111,VALUE(RIGHT(A1,8))<22222222),A1,"")

would be a possible solution for your second question 将是您第二个问题的可能解决方案

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM