M
M
Mikhail Mikhail2021-01-15 16:54:40
Python
Mikhail Mikhail, 2021-01-15 16:54:40

How to find the value of a cell at the intersection of two xls table cells using openpyxl?

60019e3927b67691663712.png
For example, when choosing Category 1 and 40, it gave the value 12 and so on

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-01-15
@latty337

There are three ways:
1. Using excel - insert somewhere in the table a formula like "sumif" or "sumprod" with the appropriate parameters, like this: ; 2. Load the table into pandas, correctly specify the column names and index, and then refer to the dataframe by column names and indexes; 3. reinvent your wheel.
ws["A1"] = "=SUM(1, 1)"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question