Google表公式以编译客户详细信息和订单
我将Google表格和Google Sheet用于我的小型企业。我给我的客户提供了Google表格,以供他们使用他们的名称,电话号码以及他们的订单,我可以在Google Sheet表单上查看所有客户的订单。
示例离开,我制作了一个新的表,并使用以下代码在单个单元格中编译了他们的详细信息和订单:
=FormResponses1!B2&char(10)&
FormResponses1!C2&char(10)&
IF(FormResponses1!D2>0,FormResponses1!D2&" - "&FormResponses1!D1&char(10), "")&
IF(FormResponses1!E2>0,FormResponses1!E2&" - "&FormResponses1!E1&char(10), "")&
IF(FormResponses1!F2>0,FormResponses1!F2&" - "&FormResponses1!F1&char(10), "")&
IF(FormResponses1!G2>0,FormResponses1!G2&" - "&FormResponses1!G1&char(10), "")&
IF(FormResponses1!H2>0,FormResponses1!H2&" - "&FormResponses1!H1&char(10), "")&
IF(FormResponses1!I2>0,FormResponses1!I2&" - "&FormResponses1!I1&char(10), "")&
IF(FormResponses1!J2>0,FormResponses1!J2&" - "&FormResponses1!J1&char(10), "")&
IF(FormResponses1!K2>0,FormResponses1!K2&" - "&FormResponses1!K1&char(10), "")&
IF(FormResponses1!L2>0,FormResponses1!L2&" - "&FormResponses1!L1&char(10), "")&
IF(FormResponses1!M2>0,FormResponses1!M2&" - "&FormResponses1!M1&char(10), "")&
IF(FormResponses1!N2>0,FormResponses1!N2&" - "&FormResponses1!N1&char(10), "")&
IF(FormResponses1!O2>0,FormResponses1!O2&" - "&FormResponses1!O1&char(10), "")&
它继续进行至少60行IF语句以实现结果,如下图中的图片
问题是,当我将公式拖到“ formResponses1!d1”(项目名称)时,更改为“ formresponses1”! D2“。因此,我必须单独更改它们。除此之外,我想知道是否有一种更简单的方法可以实现相同的结果。先感谢您!
I'm using Google Form and Google Sheet for my small business. I give my customers a Google Form for them to key in their name, phone number and what their orders are and I can view all my customers' orders in the Google Sheet Form Responses.
However, sometimes the items list can be too many for me to scroll to the right and left so I made a new sheet and compiled their details and orders in a single cell using the code below:
=FormResponses1!B2&char(10)&
FormResponses1!C2&char(10)&
IF(FormResponses1!D2>0,FormResponses1!D2&" - "&FormResponses1!D1&char(10), "")&
IF(FormResponses1!E2>0,FormResponses1!E2&" - "&FormResponses1!E1&char(10), "")&
IF(FormResponses1!F2>0,FormResponses1!F2&" - "&FormResponses1!F1&char(10), "")&
IF(FormResponses1!G2>0,FormResponses1!G2&" - "&FormResponses1!G1&char(10), "")&
IF(FormResponses1!H2>0,FormResponses1!H2&" - "&FormResponses1!H1&char(10), "")&
IF(FormResponses1!I2>0,FormResponses1!I2&" - "&FormResponses1!I1&char(10), "")&
IF(FormResponses1!J2>0,FormResponses1!J2&" - "&FormResponses1!J1&char(10), "")&
IF(FormResponses1!K2>0,FormResponses1!K2&" - "&FormResponses1!K1&char(10), "")&
IF(FormResponses1!L2>0,FormResponses1!L2&" - "&FormResponses1!L1&char(10), "")&
IF(FormResponses1!M2>0,FormResponses1!M2&" - "&FormResponses1!M1&char(10), "")&
IF(FormResponses1!N2>0,FormResponses1!N2&" - "&FormResponses1!N1&char(10), "")&
IF(FormResponses1!O2>0,FormResponses1!O2&" - "&FormResponses1!O1&char(10), "")&
it goes on for at least 60 lines of IF statements to achieve the result as in the picture below
The issue is that when i drag the formula down the "FormResponses1!D1" (the item name) changes to "FormResponses1!D2". So i have to change them individually. Other than that it works, but i was wondering if there is an easier way to achieve the same results. Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要不更改参考框架
$
在列或行的前面或两者兼而有之:f4 是快捷方式
尝试:
to not change the frame of reference use
$
in front of either column or row or both:F4 is the shortcut
try:
如果要将其制作到脚本中,则可以使用以下代码。
它将改变格式,看起来更像下面的图像,我发现这更具吸引力。如果您确实使用此选项,请不要忘记更改“ numberOfitems”值。
If you want to make this into a script, you can use the code below.
It will change the formatting to look more like the image below, which I find more appealing. If you do use this option, don't forget to change the "numberOfItems" value.