So I would greatly appreciate your help I'm having quite a struggle. What I need currently is listed below. To begin I have a data set with many individuals and information. There are a few columns that I'm interested in.
Table 1:
So each Individual is either labeled as Free, Arc 1, Arc 2 or Arc 3. Each individual also has a number of people associated with it and lastly a cost.
Individual | # of people | Cost | Type | Compliant with Costs?
A |3 |45 |Free |Yes/No?
B |2 |57 |Arc 2 |
Table 2:
I then have a table below that is broken out. Free can have 1 2 or 3 individuals and cost can be between 20 - 30 dollars for 1 30-40 for 2 and 40-50 for 3.
|Free |Arc 1 |Arc2 | Arc 3
# of people | Cost | Cost | Cost | Cost
1 |20-30 |30-40 | 60-70| 90-100
2 |30-40 |40-50 | 70-80| 100-110
3 |40-50 |60-70 | 80-90| 110-120
So i want to take the Individual column noted above and say if Individual A1 is in Free and has 3 individuals is their cost between 40-50 dollars, if so yes, if not no.
I know this will use some if formulas probably many, I tried Index(match()) and such too but couldn't figure it out if you could help that would be greatly appreciated.
Below is an example of a sample Excel file, it looks easy with just two individuals but there are hundreds so I'm hoping there is an easy formula. Again any help is greatly appreciated.
Excel Screenshot Link (Same as example above)
If you change your reference table as follows, you can use a sumifs easily to pull the min and the max and see if your cost is in between
# Type Min Max
1 Free 20 30
1 Arc 1 60 70
2 Free 30 40
I agree that the best way would be to restructure your reference table, but if you'd like to know how to get your answer as is, you can use a combination of =INDEX(MATCH(),MATCH()),=LEFT() and =MID() to get your answer, as in the following example:
The formula in E2 is:
=IF(AND(C2>= (LEFT(INDEX($I$1:$M$5,MATCH(B2,$I$1:$I$5,0),MATCH(D2,$I$1:$M$1,0)),FIND("-",INDEX($I$1:$M$5,MATCH(B2,$I$1:$I$5,0),MATCH(D2,$I$1:$M$1,0)))-1)*1), C2<=MID(INDEX($I$1:$M$5,MATCH(B2,$I$1:$I$5,0),MATCH(D2,$I$1:$M$1,0)),FIND("-",INDEX($I$1:$M$5,MATCH(B2,$I$1:$I$5,0),MATCH(D2,$I$1:$M$1,0)))+1,256)*1),"Yes","No")
Related
When using the summary function "Group" in Saved Searches (SS), is it possible to show the total count inline or even use it inline? For example, I have a SS that counts the number of cases closed in a certain date range and it groups by the assigned employee and the total is listed at the bottom, as per usual. However, when trying to calculate the percent of the total each employee closed, they all show as 100%.
Here is a picture of the results and I have also added the formulas I am currently using. Here is what it looks like when I'm editing the search. The right most columns were my attempt at getting the total inline.
I'm fairly certain this is because I am grouping by the employees (or else there would be almost 3k lines in the report), but I don't think there is a better way to solve that problem other than by grouping by the employee.
We have tried doing an actual report in NetSuite (as opposed to saved search), however, the report times out quickly and we are hoping for a quicker solution. We also considered a KPI scorecard, but the issue would be that we would need to make a SS for each employee which isn't a good long-term solution due to team changes.
Is there a way of calculating the percent of the total when using grouping? Sorry for the long post, I was trying to be as descriptive as possible. The goal is to see how much (percent wise) each employee contributed to the total cases closed.
Take your SUM column that counts the closed cases.
duplicate it but add the function % of total
So
| Field | Summary Type | Function | Formula |
| ----- | ------------ | -------- | ---------------------------------------------------- |
|Formula Numeric | Sum | | Case When {status} like 'Closed%' then 1 else 0 End |
|Formula Numeric | Sum | % of Total | Case When {status} like 'Closed%' then 1 else 0 End |
I'm doing some work across two visualisation packages, primarily Gephi but also a bespoke package called Linkoder.
They can both use .CSV formats, but data must be laid out differently, and I'm trying to find a way to do this quickly in Excel. Transpose, Offset, Direct commands all seem to come close, but not quite.
Based on my transcript, I need to convert this matrix:
Statement | links
No1 | 5 4 3 2 1
No2 | 3 1
No3 | 6 4 2
No4 | 5 2 1
...to this target-link format:
Target | Link
No1 | 5
No1 | 4
No1 | 3
No1 | 2
No1 | 1
No2 | 3
No2 | 1
No3 | 6
I am struggling to find a simple way to do this, but that's likely because I'm less adept at Excel formulations that I would like to be.
Anyone refer me to a command (or set) which can quickly convert between these formats? Because I'm looking at thousands of lines of links to convert...
Thanks in advance!
hey_arno
Even though there are ways to do that in Excel they are semi-automatic AFAIK. I would recommend you to have a look at OpenRefine, which is a tool to manipulate and tidy datasets. It can read from many sources including Excel. What you need is to split the Link column by space and then Transpose the resulting columns.
Check this tutorial and scroll down to Transposing columns for instruction on how to do it.
I am currently trying to analyze some data, and would rather have some statistical analyzes rather than trying to eye-ball patterns and differences. However, I am new to statistics and SPSS and therefore am unsure on which test should be used.
Basically, I have the averages of a trade area for 30 variables. These are already averaged out so basically I have the variable names in one column, followed by the variable averages of all trade area in 2001, then the averages in 2011 and 2016.
With this data I want to see how the trade areas have change -- in have they changed significantly or not over time. Which test would be best suited through SPSS?
Cheers
I'm not an expert in spss, but the problem requires looking at which areas are of significance. For this, statistically one needs to look at using the ANOVA or Analysis of Variance.
You may find this link useful.
I assume from your description that your data looks like this:
trade_area | 2001 | 2011 | 2016
-------------------------------
area1. | 30 | 40 | 45
area2. | 22 | 16 | 36
area3. | 44 | 45 | 36
...
If you can't aggregate all the trade areas (i.e. treat them all as a single entity), then you can, at most, say something like: in area 1, the values for 2016 and 2011 are more than the values in 2001, because 40 > 30 and 45 > 30. The reason why you can't say anymore than that is because it's hard to justify a trend with only 3 data points.
Otherwise, if you have reason to treat all the areas as one entity (maybe an aggregate area), you can conduct a two-sided t-test with the inputs: 2011 vs. 2001 and 2016 vs. 2001, and maybe 2016 vs. 2011 if you like. This will allow you to say something like: the average of all trade area values in 2011 is significantly (or not) different to the average of all trade area values in 2001.
I have a sheet that looks something like this.
A | B | C
1 Age | how often | occupation
2 21 | I don't | student
3 22 |x times a week| photographer
4 23 | etc | student
5 22 | etc | builder
6 21 | etc | car mechanic
7 20 | I don't | student
I want to track various things, such as the amount of times a student said "I don't".
I'm using google spread sheets at the moment.
How in google spread sheets can I calculate this?
At the moment this is the query I'm using to try to calculate this.
=ARRAYFORMULA(sum((B2:B7="I don't") * (C2:C7="student")))
All results are coming up as zero - cannot seem to get a result.
If anyone could help it would be much appreciated.
Have also tried below with no luck.
=SUM(IF(B2:B7="I don't",IF(C2:C7="student",1,0)))
Any help would be greatly appreciated. Thank you very much.
In google-spreadsheets, as well as in Excel, you can use the COUNTIFS() (Google, Excel) function:
=COUNTIFS(B2:B7, "I don't", C2:C7, "student")
In a google spreadsheet you can also use SUMPRODUCT()
=sumproduct(B2:B7="I don't", C2:C7="student")
You have a few options to present this information, I'll talk to countifs and pivots:
To count the amount of occurrences a text has appeared in a range of cells you'll use a formula like =COUNTIFS(B2:B7, "I don't", C2:C7, "student") however, if you're looking to see how many the string "I don't" appears, ie.. "I don't know" or "I don't care for your formula" enter in as an array selecting crtl + Shift + Enter. How to Count the Occurrences of a Text String
But. For your case, which I'm guessing is interpreting the data and drawing comparisons, such as counting students vs builders, age vs occurrences, you're better off using a pivot table. This will pull together all the information and provide an automatic sum or count on the criteria set, quickly drawing comparisons. Google has a great how to guide you can refer off for google sheets Google Pivot Table
I have to implement a set of formulas in Excel whose requirements seem to defy any logical or succinct way to do them with just formulas.
Short Description:
determine (and display) a timeline of a product's "effective" internal cost each day based on 1) the price paid for the product as a series of bulk purchases, and 2) the company's per-day consumption of the product using the price paid for each purchase, until the purchased amount is consumed and then moving on to the next purchase.
Simplified Details:
We have a sheet "PurchSums" with the product's bulk purchase history: (this is actually a pivot table)
| A | B | C | D |
1: Product Name Purch Date Rate Amount
...
23: Prod-Q 12/18/2012 $3.15 123.7
24: 1/24/2013 $3.05 748.2
25: 2/27/2013 $2.86 650.0
... ...
So initially, the internal price should be $3.15/pound until the first 123.7 pounds are used us, then it should switch to $3.05 and so on.
We have a sheet "Volumes" with consumption by day: (product consumption starts on March 1st)
| A | B | C | D |
1: Product Name 3/1/2013 3/2/2013 3/3/2013 ...
...
12: Prod-Q 87.2 77.1 101.5 ...
... ...
And I need to fill in formulas for the daily price sheet "Prices", which has the product's effective internal price for each day (filled-in by hand now):
| A | B | C | D |
1: Product Name 3/1/2013 3/2/2013 3/3/2013 ...
...
32: Prod-Q 3.15 3.15 3.05 ...
... ...
Note here that the price for "Prod-Q" changed to 3.05 on March 3rd. This is because its cumulative consumption reached 265.8 pounds (87.2 + 77.1 + 101.5) which exceeded the 12/18 purchase of 123.7 pounds and so switched from its price of 3.15 to the price of the next purchase from 1/24.
More Details:
The first sheet "PurchSums" is actually a pivot table, if that helps. Unfortunately, I don't think that it does, nor that GETPIVOTDATA(..) is going to be useful here (but I would be happy to be wrong). The information in it comes from another sheet "Purchases" which is just a list of all of the purchases:
| A | B | C | D |
1: Product Name Purch Date Rate Amount
...
11: Prod-Q 12/18/2012 $3.15 123.7
...
34: Prod-Q 1/24/2013 $3.05 748.2
...
67: Prod-Q 2/27/2013 $2.86 650.0
...
Additional:
First, I would like to do this as much as possible with Formulas in the existing cells/sheets. Plus I would like to minimize the number of additional sheets that have to be added to support this, as the workbook is already pretty substantial.
Secondly, yes I know that I could do this with VBA functions, and I will do that if there's no better way, but I would like to avoid that if possible because in my experience, populating the formulas of large sheets with massive VBA function calls can lead to some significant performance issues.
I would be grateful for any ideas on how to effectively approach this.
So what you are describing is a FIFO inventory accounting system. First In First Out. You might want to read up on it here:
http://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting
and here:
http://accountingexplained.com/financial/inventories/fifo-method
Basically under FIFO you are making the assumption(whether right or wrong) that the first items that you are adding to your inventory are the first ones you are going to use up in your production. As opposed to LIFO which makes the assumption that the last items that you add to your inventory are the first ones that you are going to use up. That would only require a small change in my solution but let's focus on FIFO since that is your question.
So for every day that you operate you need to figure out how much of your inventory you used up and how much you paid for that inventory. So if you bought 20 items at 50 dollars and then another 20 items at 100 dollars the next day - and on the third day you used up 30 of the items in production, you used up (20 * $50 ) plus ( 10 * $100 ) = $2000 worth of inventory. 2000 / 30 = your effective cost of the product for the day(66.6666667). This effective cost is purely informational for the day - you probably wouldn't want to use it for any accounting - although you could with some rounding corrections - it would just be an indirect way to go about it.
So my solution uses a really ugly table. Basically for every day that you operate you need to figure out how much of your inventory you are using up and how much you paid for that inventory - and then divide it by the total amount used up in the day. Something like this should work for you:
=(IF(AND($E8>G$4,$E8>G$5),G$3,0)+IF(AND($E8>G$4,$E8<G$5),($E8-G$4),0))-SUM(G$7:G7)
=(IF(AND($E9>G$4,$E9>G$5),G$3,0)+IF(AND($E9>G$4,$E9<G$5),($E9-G$4),0))-SUM(G$7:G8)
=G8*$C8
=SUM(G13:G15)/G3
These formulas are all auto-fillable. And you could add on to this table as much space as you need(and probably improve it quite a bit). A small program in almost any language could accomplish this much easier and more intuitively than excel - but this works fine.
In practice, oftentimes nobody really knows which pieces of inventory are being used up and thus how much you paid for them. But the system persists nonetheless - usually the reason many accounting practices are done are the same as why the ancient peoples of the earth sacrificed animals - because that's how it's always been done - tradition and folklore. And for the most part it serves them quite well - routine sources of protein are healthy. I could think of some better ways to do it but - alas. Good Luck.
Assuming you know how to:
display product names on every row from the pivot table
extract lower- and upper-bound interval points from the Amount values from the pivot table
sum Volumes from all previous days from the correct row for each product
cover edge cases like volumes outside defined amount intervals
use Office 2007+ tables
use named ranges
...
For the first day, you want the maximum price = the first row for a given product name:
=INDEX(PurchSums[Rate], MATCH(this_row_product_name, PurchSums[Product Name], 0))
For every other day, you want to sum Volumes from all previous days and extract the rate from matching interval of Amounts for a given product name:
=SUMIFS(PurchSums[Rate],
PurchSums[Product Name], this_row_product_name,
PurchSums[Amount above], TEXT(sum_of_previous_volumes_for_product, "<=General"),
PurchSums[Amount up to], TEXT(sum_of_previous_volumes_for_product, ">General"))
Note that sum_of_previous_volumes_for_product > PurchSums[Amount above] and all the other conditions should be met in 1 row only, so we sum exactly 1 row.
Example:
For cell E16 the named ranges would be replaced / point to:
this_row_product_name = Prices[[#This Row],[Product Name]] = Prices[#Product Name] = $B16
sum_of_previous_volumes_for_product = =SUM(OFFSET(Volumes[[#Headers],[2013-03-01]:[2013-03-02]], MATCH(this_row_product_name, Volumes[Product Name], 0), 0)) = SUM($C12:D12)
So basically you want to summarize your "PurchSums" sheet and "Volumes" ones into one that combines the date fields??
If this is the case....
In your summary sheet make a row filled with the dates
Make a column for Purchase amount
Make a column for Volume amount
Under the Purchase amount use a match / index formula like this:
=index({Select the column C from "PurchSums"},match( {Select date from third sheet},{Select date column from "PurchSums"},0))
Similarly do the same thing for the Volume column.
Hope this gets you on your way if I am not far off on what you are trying to accomplish.