简体   繁体   English

Excel 2016 - 如何用多个复选框中的数据填充一个单元格?

[英]Excel 2016 - How to fill one cell with data from multiply checkboxes?

For starters, im not very great or smart when it comes to Excel.首先,当谈到 Excel 时,我不是很好或很聪明。 So forgive me my question, since it might be really easy, but i just cant get it to work.所以请原谅我的问题,因为它可能真的很容易,但我无法让它发挥作用。

I have look though google and cant seem to find a solution for this, or anything that can help me in the right direction.我已经看过谷歌,但似乎无法找到解决方案,或者任何可以帮助我朝着正确方向前进的方法。

I have a list of checkboxes in excel, from D4 to D27 .我在 excel 中有一个复选框列表,从D4D27
I have every value of the checkboxes on E4 to E27 ( TRUE or FALSE ).我有E4E27上复选框的每个值( TRUEFALSE )。

Then i have a cell that should get the data from the checkboxes, when they are TRUE.然后我有一个单元格,当复选框为 TRUE 时,它应该从复选框中获取数据。 This is B27 .这是B27

B27 have a =IF(E4=TRUE; "YaY"; "Nope") script at the moment. B27目前有一个=IF(E4=TRUE; "YaY"; "Nope")脚本。 And this is working.这是有效的。 BUT, i cant get anymore IF statements in there, or nest them when it comes to text.但是,我不能再在那里得到IF statements ,也不能在文本中嵌套它们。 I might be doing it wrong though, i dont know.不过我可能做错了,我不知道。 -Yes i did try and look it but, but cant get it to work. - 是的,我确实尝试过查看它,但是无法使其正常工作。

Every checkbox has diffrent data linked to it, so if D4 is checked, then the value need to be sent to B27 , with text YAY!每个复选框都有不同的数据链接到它,所以如果D4被选中,那么值需要发送到B27 ,文本YAY! . . And then if D5 is checked, it sends the data to B27 with some other data, lets say WOO!然后如果D5被选中,它会将数据与其他一些数据一起发送到B27 ,让我们说WOO! . . So B27 should be looking like this : YAY!; WOO!;所以B27应该是这样的: YAY!; WOO!; YAY!; WOO!;

|------------------------------------------------------| |------------------------------------------------- -----|
|-------D4---------|----------E4--------------------| |-------D4---------|---------E4------------ |
|-------X-----------|---------TRUE----------------| |-------X-----------|---------TRUE----------------|
|-------X-----------|---------TRUE----------------| |-------X-----------|---------TRUE----------------|
|-------B27--------|---------YAY!; |-------B27--------|---------YAY!; WOO!;-------|哇!;-------|
|------------------------------------------------------| |------------------------------------------------- -----|

How can i get this done?我怎样才能做到这一点?

I have tried to look at Macro scripting as well, but that was a great failure.我也尝试过查看宏脚本,但那是一个巨大的失败。

Can someone show me in the right direction, or help me out how this can be done?有人可以向我展示正确的方向,或者帮助我了解如何做到这一点?

Based on your description I would solve it as follows:根据你的描述,我将解决它如下:

  • Col. D: Checkboxes D 栏:复选框
  • Col. E: TRUE/FALSE statements (based on used checkbox) E 列:TRUE/FALSE 语句(基于使用的复选框)
  • Col. F: Answer if statement is TRUE (eg YAY!) F 列:如果语句为真,则回答(例如 YAY!)
  • Col. G: Answer if statement is FALSE (eg Nope!) Col. G:如果语句为 FALSE,则回答(例如 Nope!)

Then you can use the following formula in B27:那么你可以在 B27 中使用以下公式:

=IF(E4,F4,G4)&" " & IF(E5,F5,G5) &" " & IF(E..,F..,G..)

Based on the logical result in E, you get the desired answer in cell B27.根据 E 中的逻辑结果,您将在单元格 B27 中获得所需的答案。 Using the "&" you can combine all if statements.使用“&”可以组合所有的 if 语句。

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

相关问题 从用户表单填充单元格(几个复选框之一) - Fill cell from userform (one out of several checkboxes) 如何在Excel中使用来自单独工作表的数据填充单元格? - How to fill cell with data from a separate worksheet in excel? 将多个数据从单个单元格拆分为多个单元格 Excel 2016 - Split multiple data from single cell into multiple cells Excel 2016 在Excel 2016中更改一个单元格的大小 - Change the size of one cell in excel 2016 如何将多个单元格中的数据合并到Excel 2010中的一个单元格中? - How to combine data from multiple cells into one cell in Excel 2010? 如何通过将一个特定单元格中的数据作为变量从一个 Excel 存储到另一个 Excel 中来写入数据 - How to Write Data from one particular cell by storing it as a variable from one Excel to Another Excel Excel帮助:如何用依赖于多个变量的表中的数据填充单元格 - Excel help: How to fill a cell with data from a table dependent on multiple variables Excel:如何与范围内的空白单元相乘? - Excel: How to multiply with blanks cell in range? 如何在Excel 2016中检查两个工作表中的数据? - How to check data from two worksheets in Excel 2016? 如何从正则表达式生成随机文本以填充Excel单元格 - How to generate random text from regex to fill an excel cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM