谷歌中阻止冒泡在火狐中失效
Whether you have two integers, a few cells, or a couple of columns that need to be multiplied together, Google Sheets provides a few different ways to find the product of your data. Here’s how.
无论您有两个整数,几个单元格,还是需要相乘的几列,Google表格都提供了几种查找数据乘积的方法。 这是如何做。
将两个整数相乘 (Multiply Two Integers Together)
There are two ways to find the product of two numbers. One uses a built-in formula, while the other uses the multiply operand to complete the calculation. Both work virtually the same and multiply numbers just as you would expect.
有两种方法可以找到两个数的乘积。 一个使用内置公式,而另一个使用乘法操作数来完成计算。 两者的工作原理几乎相同,并且与您期望的数字相乘。
使用乘法公式 (Using the MULTIPLY Formula)
Fire up your browser, head to Google Sheets, and open a spreadsheet.
启动浏览器,转到Google表格,然后打开电子表格。
Click on an empty cell and type =MULTIPLY(<number1>,<number2>)
into the formula entry field, replacing <number1>
and <number2>
with the two integers you want to multiply.
单击一个空单元格,然后在公式输入字段中输入=MULTIPLY(<number1>,<number2>)
,将<number1>
和<number2>
替换为要相乘的两个整数。
You can also use the data inside another cell. Instead of a number, type the cell number and Sheets will automatically put the integer from that cell in its place.
您还可以在另一个单元格中使用数据。 输入数字而不是数字,表格将自动将该单元格中的整数放在其位置。
After you input the numbers or cell numbers, press the Enter key and Sheets will place the results in the cell.
输入数字或单元格编号后,按Enter键,Sheets将把结果放在单元格中。
使用乘法操作数 (Using the Multiply Operand)
This method uses the multiply operand (*) to find the product of some numbers. The only difference is you’re able to input more than two multiplicands, whereas the previous formula is limited to two.
此方法使用乘法操作数(*)查找某些数字的乘积。 唯一的区别是您可以输入两个以上的被乘数,而先前的公式限于两个。
From your Google Sheets spreadsheet, click an empty cell and type =<number1> * <number2>
into the formula entry field, replacing <number1>
and <number2>
with the two integers you want to multiply.
在您的Google表格电子表格中,单击一个空单元格,然后在公式输入字段中输入=<number1> * <number2>
,将<number1>
和<number2>
替换为您要相乘的两个整数。
Just like before, you can reference other cells inside the spreadsheet. Replace either number with the number of a cell that contains an integer in it.
和以前一样,您可以引用电子表格中的其他单元格。 将其中一个数字替换为其中包含整数的单元格的数字。
After you input the integers or cell numbers, press the Enter key and Sheets will place the results in the cell.
输入整数或单元格编号后,按Enter键,Sheets将把结果放在单元格中。
Pro tip: If you’re working with a table and want to multiply the data from rows 1 and 2 into row 3, Google Sheets has a neat feature that applies the formula to the remaining cells. It fills in the remaining cells with the formula and the results. Double-click the little blue square, and, like magic, the rest of the table is filled in with the product of the two numbers.
专家提示:如果您使用的是表格,并且希望将第1行和第2行的数据乘以第3行,则Google表格具有一项巧妙的功能,可将公式应用于其余单元格。 它用公式和结果填充剩余的单元格。 双击蓝色小方块,然后像魔术一样,在表格的其余部分填充两个数字的乘积。
乘以ArrayFormula (Multiply Using ArrayFormula)
This next method uses the ARRAYFORMULA
function to display values returned from multiple rows or columns of the same size.
下一个方法使用ARRAYFORMULA
函数显示从相同大小的多行或多列返回的值。
From your Google Sheets spreadsheet, click an empty cell and type =ARRAYFORMULA(<column1> * <column2>)
into the formula entry field, replacing <column1>
and <column2>
with the two columns you want to multiply. It should look something like this:
在您的Google表格电子表格中,单击一个空单元格,然后在公式输入字段中输入=ARRAYFORMULA(<column1> * <column2>)
,将<column1>
和<column2>
替换为您要相乘的两列。 它看起来应该像这样:
=ARRAYFORMULA(A:A*B:B)
If your columns have a header in the first row, Sheets will throw an error because it expects only numbers as parameters.
如果您的列在第一行中有标题,则表格将引发错误,因为它只希望数字作为参数。
Instead, you will need to start with the first cell that contains a number. For example, instead of A:A*B:B
, you would type A2:A*B2:B
into the formula.
相反,您需要从包含数字的第一个单元格开始。 例如,您可以在公式中键入A2:A*B2:B
而不是A:A*B:B
。
The only caveat to using the formula like this is any empty cells will use “0” in the formula. However, any other data you add to the table gets calculated dynamically, replacing each zero with the results.
使用这样的公式的唯一警告是任何空单元格在公式中都将使用“ 0”。 但是,您添加到表中的所有其他数据都是动态计算的,用结果替换每个零。
If you want to limit the number of trailing zeros in your results, you should select a fixed range when you enter the formula. The new formula will look like this:
如果要限制结果中的尾随零数,则在输入公式时应选择一个固定范围。 新公式将如下所示:
=ARRAYFORMULA(B2:B100*C2:C100)
This way, the spreadsheet uses only 100 cells as a reserve for any data you enter later. You can edit the formula and remove any unused cells by changing the 100 to a smaller number.
这样,电子表格仅使用100个单元格作为以后输入的任何数据的储备。 您可以通过将100更改为较小的数字来编辑公式并删除所有未使用的单元格。
Whether you need to multiply static integers, data from two cells, or the entire contents of two columns, Google Sheets provides a couple of methods to help you calculate the product.
无论您需要乘以静态整数,两个单元格中的数据还是两列的全部内容,Google表格都可以提供两种方法来帮助您计算乘积。
翻译自: https://www.howtogeek.com/445247/how-to-multiply-numbers-in-google-sheets/
谷歌中阻止冒泡在火狐中失效