Google Sheets: dynamic sum-formula of multiple sheets - google-sheets-formula

I'm working on a call tracking sheet for our sales teams to see their numbers.
Now I've following case I don't know how to solve.
Every sales person has his own sheet with his name.
In the main sheet I want to add up the data from all sellers, which currently happens via the following formula:
='Closer 1'!C4+'Closer 2'!C4+'Closer 3'!C4+'Closer 4'!C4+'Closer 5'!C4+'Closer 6'!C4+'Closer 7'!C4+'Closer 8'!C4
My question now is, how can I dynamically extend the formula with a database table so that when another seller is added, I don't have to adjust a formula?
That the formula is automatically supplemented by the additional person?
Here I added a picture how does it look like: Picture 1
The Sheet of a sales person looks like: Picture 2
Because It would need really much time to change all the formulas for every day of the year.
Thank you very much for your help guys!

My idea is to use INDIRECT function and store sellers names in sum sheet.
This formula treats string as a reference so you can take sheetnames from your spreadsheet.
My sheet you can find here:
https://docs.google.com/spreadsheets/d/1f31vxTFhAvmPNzx5oIleZHYfyxnFz73jCHkbP6_5hmA/copy

Related

Duplicate key measure columns appearing in a matrix

The requirement:
My users want a slicer which displays the dimensions of a data table they can then select from and have the dimensions display in a corresponding matrix visual along with two measures, Sales TY and Sales LY.
Progress so far.
I’ve achieved this by taking the table, selecting the column which indexes the table and unpivoting the rest of the columns. Next I place a slicer on the report and attach it to the unpivoted table’s Attributes field (now renamed as ‘Column’). Finally, I add a matrix visual to the report and add to it the unpivoted table fields Column, Index and Value fields. Now when I click on the slicer, whichever dimensions I select appear in the matrix.
The problem:
However, when adding the measures previously created (Sales TY and Sales LY) to the matrix, each measure is repeated after every column selected for display, whereas I only want the measures to display once.
Does anyone know if this possible? I’ve tried a number of approaches but nothing seems to work. I’m a new user so apologies if this is an FAQ I’ve yet to come across or I’m doing something glaringly obviously wrong. As I say I’m only just starting out in DAX and Power BI. I’m looking pretty hard at table functions and the Switch statement with the hope of calculating the solution somehow but haven’t managed it yet. Any advice, steer or comment greatly appreciated, thanks.

Filter Data for Each Row in a Column

EVE Online Manufacturing Spreadsheet
In Batch!F3:G, I'm attempting to break down the data input from columns B3:C to their components (and eventually materials/minerals in I3:J) by using filter to compare results in Engine!P:R. Multiplied of course by the total number of each finished product I need.
I've been trying to figure out ways to arrayformula this together, and even tried quite a few query functions without success. The best I've been able to come up with is to string the actual formula together, appending them with {}, but this gets bloated quickly. I need this to be open ended because I have a tendency to build a lot of things at once. Any help would be appreciated, even just point me in the right direction!
Well, based on my limited knowledge about google sheet, I can only think of one way to do this automatically.
Here's a sheet I constructed based on your sheet.
https://docs.google.com/spreadsheets/d/1AfX8o05gUGPiN5S90w4o0yxuIYjsJRaXsaYUFTJuEPo/edit?usp=sharing
First, on Engine sheet, add one more column which will give you the number of materials required for that part, which is looked up in the PART LIST of BATCH sheet. For this I use VLOOKUP, as you see in D2.
Then on BATCH sheet, query the materials that VLOOKUP return positive, multiply it by the amount of item and then sum them.
This is done by the QUERY used in F3
This method only if you don't have duplicate item in your PART LIST, due to the way VLOOKUP work.
Of course if you want to break the material list further, you can do the same approach..

how to make matrix based on the row data in google spreadsheet

I have a google spreadsheet which matches submodules and product. Below is what sheet looks like.
What I want to do is transform this data to matrix such like below.
Can I make it with one function? I want to use it in Mmult function so it would be better matrix without labels.
I cannot catch any ID to get through it. Hope I get good clues to do it. Thanks a lot.
Not quite the result you show from the data sample provided, but I think at least close to what you want:
=query(A2:C5,"select B, sum(C) group by B pivot A")
To get a 0 in the pivot table I added a row in the source data.

Google ImportXML to Scrape Prices off TIAA.org

A number of investments from TIAA.org are not traded on exchanges and not available via a ticker symbol thru say GoogleFinance etc. For one of these I would like to 'scrape' the daily price directly off of TIAA.org website and into a cell auto-magically.
In Google sheets I thought it would be easy enough using ImportHTML as a table but no luck. I've experimented with ImportXML but cannot seem to figure out how to set the xpath query for the specific price I'm interested in and leaving me confused - keep ending up with a "N/A" cell ("Error: Imported content is empty").
Using this URL:
https://www.tiaa.org/public/investment-performance/tiaavariableannuity/profile?ticker=41091375
Could someone take a look and suggest how I might import the daily price (aka unit value) for QREARX into a Google sheet cell using an xpath with ImportXML or other method?
Thanks
If you slightly change your url prefix to https://www.tiaa.org/public/tcfpi/Investment/Portfolio?symbol= and then add your ticket number at the end like you did in your example: 41091375
then you can use this importxml function to pull in the value your looking for:
=IMPORTXML("https://www.tiaa.org/public/tcfpi/Investment/Portfolio?symbol=41091375","//*[#class='first']/text()")

a bit of a string matching conundrum in excel-vba

i'm writing a program at work for a categorizing issue.
i get data in the form of CODE, DESCRIPTION, SUB-TOTAL for example:
LIQ013 COGNAC 25
LIQ023 VODKA 21
FD0001 PRETZELS 10
PP0502 NAPKINS 5
Now it all generally follows something like this...the problem is my company supplies numerous different bars. So there are like 800 records a month with data like this. My boss wants to breakdown the data so she knows how much we spend on a certain category each month. For example:
ALCOHOL 46
FOOD 10
PAPER 5
What I've thought of is I setup a sort of "data-base" which is really a csv text file that contains entries like this:
LIQ,COGNAC,ALCOHOL
LIQ,VODKA,ALCOHOL
FD,PRETZELS,FOOD
FD,POPCORN,FOOD
I've already written code that imports the database as a worksheet and separates each field into its own column. I want excel to look through the file and when it sees LIQ and COGNAC to assign it the ALCOHOL designator. That way I can use a pivot table to get the category sums. For example I want the final product to look like this:
LIQ013 COGNAC 25 ALCOHOL
LIQ023 VODKA 21 ALCOHOL
FD0001 PRETZELS 10 FOOD
PP0502 NAPKINS 5 PAPER
Does anyone have any suggestions? My worry is that a single point expression match to JUST the code i.e. just to LIQ without a match to COGNAC as well would maybe result in problems later when there are conflicting descriptions? I'd also like the user to be able to add ledger entries so that the database of recognized terms grows and becomes more expansive and hopefully more accurate.
EDIT
as per #Marc 's request i'm including my solution:
code file
please note that this is a pretty dumb-ed down solution. i removed a bunch of the fail-safes and other bits of code that were relevant to a robust code but not to our particular solution.
in order to get this to work there are two parts:
the first is the macro source code
the second is the actual file
because all the fail-safes are removed, the file needs to be imported to excel exactly the way it appears. i.e. Sheet1 on the googleDoc should be Sheet1 on the excel, start pasting data at cell "A1". before the macro is run, be sure to select cell "A1" in Sheet1. as i said, there are implementations in the finished product to make it more user friendly! enjoy!
EDIT2
These links suck. They don't paste well into excel.
If your comfortable with it I can email you the actual workbook. Which would help in preserving the formatting etc.
Use a lookup table in a separate sheet. Column A of the lookup sheet contains the lookup value (e.g. PRETZELS), Column B contains the category (FOOD, ALCOHOL, etc). In the cells where you want the category to show up in your original sheet (let's use D3 for the result where B3 holds the "PRETZELS" value), type this formula:
=VLOOKUP(B3,OtherSheet!$A$1:$B$500,2,FALSE)
That assumes that your lookup table is in range A1:B500 of a worksheet named "OtherSheet".
This formula tells Excel to find the lookup value (B3) in column A of your lookup and return the corresponding value from column B of your lookup table. Absolute references (the $) ensure that your formula won't increment cell references when you copy/paste the formula in other cells.
When you get new categories and/or inventory, you can update your lookup table in this one place by just adding new rows to it.

Resources