excel中转换为数值_如何在Microsoft Excel中转​​换货币

excel中转换为数值

excel中转换为数值

The Microsoft Excel Logo.

Microsoft Excel doesn’t include built-in tools to convert currency. However, you can use an external data source to provide up-to-date rates. A basic multiplication formula will then convert from one currency to another. Here’s how you do it!

Microsoft Excel不包含用于转换货币的内置工具。 但是,您可以使用外部数据源提供最新汇率。 然后,基本的乘法公式将从一种货币转换为另一种货币。 这是您的操作方式!

将外部数据源添加到Excel (Adding an External Data Source to Excel)

An external data source is the best way to get up-to-date currency exchange rates. You can use this data to convert from one currency to another in Excel. The process is similar to converting currency in Google Sheets.

外部数据源是获取最新货币汇率的最佳方法。 您可以使用此数据在Excel中将一种货币转换为另一种货币。 该过程类似于在Google表格中转换货币

First, you need a suitable online data source (in the XML format) that you can import into your spreadsheet. FloatRates has various XML feeds based around different currencies that you can use.

首先,您需要一个合适的在线数据源(XML格式),您可以将其导入电子表格。 FloatRates具有基于您可以使用的不同货币的各种XML feed。

After you find the one you want to use, open your Excel spreadsheet. In Excel 2019 or Office 365, click Data > Get Data > From File > From XML. In older versions of Excel, click Data > Get External Data > From Other Sources > From XML Data Import instead.

找到要使用的文件后,打开Excel电子表格。 在Excel 2019或Office 365中,单击数据>获取数据>从文件>从XML。 在旧版本的Excel中,请依次单击数据>获取外部数据>从其他来源>从XML数据导入。

Click "Data," click "Get Data," click "From File," and then select "From XML."

For our example, we’re using the FloatRates USD data feed, so we import that into Excel.

对于我们的示例,我们使用的是FloatRates USD数据供稿,因此我们将其导入Excel。

In the “Import Data” window, paste the URL to your XML data feed in the “File Name” box, and then click “Import.”

在“导入数据”窗口中,将URL粘贴到XML数据源中的“文件名”框中,然后单击“导入”。

Paste the URL in the "File Name" box, and then click "Import."

If you have Office 2019 or 365, you see a preview of how the data will be imported. If you’re using FloatRates data, you have to convert it in the Excel Power Query Editor to use it.

如果您拥有Office 2019或365,则会看到有关如何导入数据的预览。 如果您使用的是FloatRates数据,则必须在Excel Power Query Editor中对其进行转换才能使用它。

To do so, click “Transform Data.”

为此,请点击“转换数据”。

Click "Transform Data."

The Excel Power Query Editor appears. Scroll to the “Item” column, and then double-click “Table” to load the up-to-date currency rates.

出现Excel Power Query编辑器。 滚动到“项目”列,然后双击“表”以加载最新的货币汇率。

Double-click "Table."

The Power Query Editor preview updates and shows the FloatRates currency data. Click “Close and Load” in the top-left corner to add the data to your spreadsheet.

Power Query Editor预览更新并显示FloatRates货币数据。 单击左上角的“关闭并加载”以将数据添加到电子表格中。

Click "Close and Load."

The data you import appears in a new worksheet, to which you can now refer when you need to convert currency.

导入的数据将显示在新的工作表中,现在您可以在需要转换货币时参考该工作表。

Most external data sources update hourly, but FloatRates only updates every 12 hours. If you want to update your data manually, click Data > Refresh All.

大多数外部数据源每小时更新一次,但FloatRates仅每12小时更新一次。 如果要手动更新数据,请单击数据>全部刷新。

Click "Data," and then select "Refresh All."

在Microsoft Excel中转​​换货币 (Converting Currency in Microsoft Excel)

You can use the up-to-date data you imported to convert currency figures with a simple multiplication formula.

您可以使用导入的最新数据通过简单的乘法公式转换货币数字。

Click the worksheet with your imported currency rates. If you’re using FloatRates data, look at the exchange rates under the “exchangeRate” column. Note the cell that contains the rate of the currency to which you want to convert.

单击带有您导入的货币汇率的工作表。 如果您使用的是FloatRates数据,请查看“ exchangeRate”列下的汇率。 请注意包含您要转换为货币的汇率的单元格。

Using our FloatRates U.S. dollar data, we see that to convert from U.S. dollars to British pounds, we need to use the GBP exchange rate in cell I3.

使用我们的FloatRates美元数据,我们发现要从美元转换为英镑,我们需要使用I3单元格中的GBP汇率。

An Excel spreadsheet with cell I3 highlighted.

Return to your existing worksheet, and type the USD price from which you want to convert into a cell. In a second cell, use the formula =A2*Sheet2!$I$3, and replace “A2” with the cell that contains your USD price.

返回到您现有的工作表,然后键入您要从中转换为单元格的USD价格。 在第二个单元格中,使用公式=A2*Sheet2!$I$3 ,并将“ A2”替换为包含您的美元价格的单元格。

Replace the second part of the formula with an absolute reference to the cell in the “exchangeRate” column on your imported data worksheet that contains the exchange rate to which you want to convert.

用对导入数据工作表上“ exchangeRate”列中包含要转换的汇率的单元格的绝对引用替换公式的第二部分。

The "=A2*Sheet2!$I$3" formula and cell B2 highlighted in an Excel spreadsheet.

In the example above, Column A lists U.S. dollars. Column B lists the converted currency rates from U.S. dollars to British pounds (1 USD to GBP is in cell B2).

在上面的示例中,A列列出了美元。 B列列出了从美元到英镑的汇率转换(B2单元格中为1 USD到GBP)。

When you change the absolute cell reference and use alternative data sources (like the FloatRates GBP data source to convert from GBP to other currencies), you can convert from any currency to another.

当您更改绝对单元格引用并使用其他数据源(例如FloatRates GBP数据源,以将GBP转换为其他货币)时,可以将任何货币转换为另一种货币。

You can also use a manual rate instead of an external data source to convert currency rates. Just set the exchange rate manually in a cell (in our example, cell B2), and the price in another (cell A3).

您也可以使用手动汇率代替外部数据源来转换货币汇率。 只需在一个单元格(在我们的示例中为B2单元格)中手动设置汇率,在另一个单元格(A3单元格)中手动设置价格。

An example of manual currency conversion in an Excel spreadsheet.

The same multiplication formula converts your currency. However, if you’re not using an external data source, you’ll have to update the rate manually to see the correct price.

相同的乘法公式可以转换您的货币。 但是,如果您不使用外部数据源,则必须手动更新费率以查看正确的价格。

翻译自: https://www.howtogeek.com/512768/how-to-convert-currency-in-microsoft-excel/

excel中转换为数值