嵌套= if()函数的哪种替代方法可以根据另一个静态值返回静态值?

发布于 2025-02-11 04:34:13 字数 601 浏览 0 评论 0原文

我希望我能正确地表达这一点。

我可以使用大量(可能有30-40条不同的条件)嵌套=()来涵盖所讨论的情况,并且看起来像这样:

= if(a2 =“ 01501-01”,“ i77) ”,if(a2 =“ 06823-04”,“ i323”,if(a2 =“ 1021-591”,“ i3”,“”)))))

等。等于01501-01,返回i77。如果06823-04,请返回I323。但是我们这里有很多可能性。话虽如此,01501-01始终需要与i77匹配,依此类推。对于情况本身:

“在此处输入图像描述”

列C我们将从另一个电子表格粘贴值,并且需要D列以使用正确的I号码自动填充。在列中粘贴的值的95%将是先前条目的重复,因此应将它们与D列D相关。对于新的客户ID,我们只想将“ 1”放置,以便当我们导入此信息时文件到我们的数据库,数据库将自动分配到组。我希望这一切都有意义。

I hope I phrased that correctly.

I can use a massive (probably with 30-40 different conditions) nested =if() to cover the situation in question, and it would look something like this:

=if(A2="01501-01","I77",if(A2="06823-04","I323",if(A2="1021-591","I3","")))

etc etc etc. Which says if the value in A2 is equal to 01501-01, return I77. If 06823-04, return I323. But we have a large number of possibilities here. That being said, 01501-01 will ALWAYS need to be matched with I77, and so on. For the situation itself:

enter image description here

Column C we will be pasting values from another spreadsheet, and need column D to auto-populate with the proper I number. 95% of the values being pasted in column see will be repeats of previous entries, so they should be tied to a value in column D. For the new Customer IDs, we will want to just put "1" so that when we import this file to our database, the database will auto-assign to a group. I hope this all made sense.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文