From the course: Python in Excel: Data Outputs in Custom Data Visualizations and Algorithms
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Determining calculation order
From the course: Python in Excel: Data Outputs in Custom Data Visualizations and Algorithms
Determining calculation order
- [Instructor] When we write Python code in our Excel cells, we want to be careful about where we place our code and, subsequently, the cells that reference other pieces of Python code. These Python code cells need to execute in an order where they go across and down from the previous references in a Z shape. Excel also reads from the first sheets to the last in that order, so we want to think about this order strategically as we build out our models by optimally putting the calculations in the pages after the data, especially for Python code. In the order tab of our Excel file let's see how this works for better context. Let's set the blue cell in the middle of the grid for the Excel cell calculation order to three. We'll then display the calculation that we want to put into the eight cells surrounding it. We're going to take the cell C five and add two to it. Here's the formula we're going to put in these gray cells surrounding the blue one in the calculation table above it. We'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Breaking down Excel and Python processes1m 48s
-
(Locked)
Leveraging Power Query6m 32s
-
(Locked)
Using the PY Excel function3m 44s
-
(Locked)
Using the XL Excel function and Python variables4m 23s
-
(Locked)
Determining calculation order4m 31s
-
(Locked)
Importing Python libraries into Excel3m 20s
-
(Locked)
Managing errors4m 14s
-
(Locked)
Working with Python objects7m 3s
-
(Locked)
Transforming DataFrame objects7m 41s
-
(Locked)
Challenge: Creating table objects in Excel2m 15s
-
(Locked)
Solution: Creating table objects in Excel3m 9s
-
-
-
-