I know how to program in python/go/bash, but I'm a super noob when it comes to excel or google sheets. Sometimes they are super helpful, but I often find it difficult to figure out what's an easy approach to solve problems.
My issue here is mostly not knowing what query to search for / how to describe my problem.
In this case, I'm trying to calculate what length of various cables I need to buy to rewire my house (coax, cat6a, etc): left axis is cable conduits, multiplier is conduit length, and top axis is cable types. This issue applies to a lot of other things I've had to deal with in the past too so I'll generalize below.
Here is an example table for the initial data/planning:
| multiplier | a | b | c | d | |
|---|---|---|---|---|---|
| 1 | 10 | 2 | 1 | ||
| 2 | 20 | 1 | 1 | ||
| 3 | 30 | 1 | |||
| 4 | 40 | 1 | 2 |
What I want to achieve is:
| x | n | total |
|---|---|---|
| a | 3 | =2*10+1*30 |
| b | 2 | =1*20+1*40 |
| c | 3 | =1*10+2*40 |
| d | 1 | =1*20 |
I know that transposing from c1:f1 is my first step to creating the left axis, and I have experience using SUMIF, but this is more complex as it needs multiplication.
Bonus: I would also love to be able to generate this table
| x-n | count | len |
|---|---|---|
| a-1 | 2 | 10 |
| a-3 | 1 | 30 |
| b-2 | 1 | 20 |
| b-4 | 1 | 40 |
| c-1 | 1 | 10 |
| c-4 | 2 | 40 |
| d-2 | 1 | 20 |