Monday, December 27, 2021

TEACHING EXCEL FOR DATA ANALYSIS: HANDS ON 34 Using data sources

 

Using data sources

You have been asked to create a price list, in Canadian dollars, for some of your company’s products. You will need to update it regularly using the current exchange rate. You first need to import your price list, then create a web query to load and maintain the current exchange rate.

Note: The will need the following activities to complete this exercise:

  • https://github.com/alcadelina/Excel-

1. Click on the link below to open the Microsoft Excel exercise document you can use to complete this exercise.

https://github.com/alcadelina/Excel-
2. Click Data → From Text/CSV:

Workbook Excel open, Data tab selected, From Textt/CSV selected

3. The Import Data dialog box will open. Navigate to your activity files and select Exercise: Using Data Sources_text, then click the Import button:

Import Data window open, Activity 6-2.txt file selected, Import button selected

4. The Get & Transform Data dialog box will open, displaying the data in the source file. If the selection in the Delimiter drop-down list reads --Custom--, and there is an extra header, click to select the Tab option in the Delimiter drop-down list:

Get & Transform Data dialog box open, Delimiter drop-down selected, Tab option selected from the list

5. With your data properly aligned in the list box, click the Load button:

Get & Transform Data dialog box open, Load button selected

6. A new worksheet is created and the data from your text file is loaded as a table. The Queries & Connections task pane opens on the right of the screen:

New worksheet created, data from the text file was loaded as a table, The Queries & Connections pane opened on the right.

7. Click on the Sheet1 tab to make it the active worksheet. Click to select cell A1, then press Ctrl + C to copy the URL of the exchange rate site:

Excel workbook open, Data tab selected, From Web option selected

8. Now click Data → From Web:

Excel workbook open, Data tab selected, From Web option selected

9. The From Web dialog box will open. Click to select the URL field, then press Ctrl + V, to paste the URL. Click OK:

From Web window open, The URL field selected, and copied, "OK" button selected

10. The Navigator dialog box will open. Click to select Table 0 in the list box on the left, confirm the data is present in the Table View window on the right, then click the Load button:

Navigator dialog box open, Table 0 selected from the list, and appears in the Table View on the right, Load button selected

11. A new worksheet is created and the data from the website is loaded as a table. The query appears under the Exercise: Using Data Sources

Worksheet was created and the data from the website was loaded a a table

12. Hover your cursor over the web query in the Queries & Connections task pane, then click Edit in the table dialog box that appears:

The cursor hovered the web query  in the Queries &  Connections pane, a table dialog box appears Edit option selected

13. The Power Query Editor will launch. Click the filter button to the right of the header of the Country-Currency column, then click to select the Text Filters field and begin typing “Canada”. When Canada-Dollar is the only selected item, click OK:

The Power Query Editor launched, Filter button selected, Text Filters field selected, Canada typed, Canada-Dollar selected

14. Click the Close and Load command in the Close group of the Home tab:

Excel workbook open, Home table selected, Close and Load selected

15. You will see that the Web Query table now only displays the Canada-Dollar row of data from the data set:

Excel workbook open, Web Query table displayed Canada-Dollar row from the data set

16. Click the Sheet2 tab to make it the active sheet, then click to select cell C2. Type the formula “=[@[US Dollars]]*VLOOKUP("Canada-Dollar",Sheet3!A:B,2,FALSE)”, then press the Enter key:

Excel workbook open, Sheet 2 tab selected, C2 selected and typed the formula, "Enter" button selected

17. The table containing the price list will auto complete the formula for every row in the column:

Excel workbook open, table containing the price list that completed the formula for every row in the column

18. To refresh the data from the website, right-click on the query in the Queries and Connections task pane, then select Refresh:

Queries and Connections pane open, right click, pane opens and Refresh option selected

19. You can now save your changes as Activity 6-2 Complete and close Microsoft Excel 365 to complete the activity.

20. Now, you can check out an example of a completed document in the link below:

https://github.com/alcadelina/Excel-

No comments:

Post a Comment