Functional Error in Excel Array Formula - excel

I have a table on which I want to perform to array operation. Here is my table
snapshot of Excel.
Table Data
+-------+---------+------+-------+
| Stock | Date | Open | Close |
+-------+---------+------+-------+
| GOOG | 10-1-12 | 759 | 762 |
| GOOG | 10-2-12 | 765 | 757 |
| GOOG | 10-3-12 | 756 | 763 |
| GOOG | 10-4-12 | 762 | 768 |
+-------+---------+------+-------+
My question now is why I am getting different values for the exact same formula in column E. I performed the similar process in column G but this time selecting G2:G5 and pressing Ctrl+Shift+Enter.
Formula in all cells in column E: =D2:D5-C2:C5

Related

Populate column based on values in another

I have an Excel table as per the below.
| A | B |
+-------+------+
| 100 | |
| #N/A | |
| 200 | |
| #N/A | |
| #N/A | |
What I am trying to do, is to populate the values in column B, based on the latest non error value in column A. As per the table below. I am not sure which Excel function to use, so don't have anything I have tried yet.
Desired result
| A | B |
+-------+------+
| 100 | 100 |
| #N/A | 100 |
| 200 | 200 |
| #N/A | 200 |
| #N/A | 200 |
Any help greatly appreciated.
in B1 enter:
=A1
in B2 enter:
=IF(ISERROR(A2),B1,A2)
and copy downward:

How to transpose all subfields in front of the parent field of a pivot table in Excel

I have a data of automotive spare parts with their multiple store locations in a warehouse.
all I want to do is get the locations in front of the part number, so that it is easy to know all the locations of a specific part number.
The current pivot data looks like this
I've manually transposed a few rows in the below image, but the data contains around 70K rows, Hence I'm looking for a better solution
Kindly refer to the below table
+--------------+-----+-------+-------------+
| Item name | Qty | UoM | Stock |
+--------------+-----+-------+-------------+
| '0450000115 | 324 | piece | G12B04 |
| '0450000A61 | 312 | piece | G12B05 |
| '0450000115 | 336 | piece | G12B06 |
| '0450000A61 | 228 | piece | G12B07 |
| '0450000115 | 336 | piece | G12B08 |
| '0450000115 | 192 | piece | G12B09 |
| '087902E200A | 470 | piece | G12B10 |
| '087902E200A | 760 | piece | G12B13 |
| '087902E200A | 759 | piece | G12B14 |
| '0450000115 | 336 | piece | G12B15 |
| '087902E200A | 400 | piece | G12B16 |
| '087902E200A | 10 | piece | G3B32 |
| '084B410426 | 100 | piece | G3B32 |
| '087902E200A | 300 | piece | G4B08 |
| '0450000A61 | 2 | piece | GDB01 |
| '084B410426 | 60 | piece | GR.04.C.04. |
| '087902E200A | 327 | piece | HD.03.K.05. |
+--------------+-----+-------+-------------+
You need to create a measure, using the CONCATENATEX function. For this you need to add your data to the datamodel. You can do this by checking the box add this data to the datamodel on the bottom of the create pivottable dialogbox.
Rightclick the table on the Pivottable Fields Pane and select add measure. Then create the following measure: = CONCATENATEX('table','table'[Stock],", ")
Now put [Item name] on Rows and the measure [StockText] on Values. This should be the result:

excel:how to calculate average interval time

+-------------+----------+----------+--------+------------------+
| customer_id | date | time | answer | missed_call_type |
+-------------+----------+----------+--------+------------------+
| 101 | 2018/8/3 | 12:13:00 | no | employee  |
| 102 | 2018/8/3 | 12:15:00 | no | customer |
| 103 | 2018/8/3 | 12:20:00 | no | employee  |
| 102 | 2018/8/3 | 15:15:00 | no | customer |
| 101 | 2018/8/3 | 18:15:00 | no | employee  |
| 105 | 2018/8/3 | 18:18:00 | no | customer |
| 102 | 2018/8/3 | 19:18:00 | no | employee  |
+-------------+----------+----------+--------+------------------+
I got a table whick looks like this and wanted to calculate average interval time for those who did not answer the phone.
for this example,the average interval time is:
{(18:15:00-12:13:00)+[(19:18:00-15:15:00)+(15:15:00-12:15:00)]/2}/2
the problem is I could only manipulate it in Excel...someone knows Excel please help!or any suggestion is fine,I am familiar with SQL.
I've entered your data as shown below, and added a time_to_next_call-column which calculates the interval until the next call to the same customer_id using the formula: =INDEX(C3:C$8,MATCH(A2,A3:A$8,0))-C2 for the first cell in the data set.
Then, list your customer IDs in a column, and use and AVERAGEIF-function to calcualte the average time_to_next_call for that customer_ID, as shown below:
As I've placed the customer_id 101 in cell A12, my function for calculating the average time_to_next_call is: =AVERAGEIFS($F$2:$F$8,$A$2:$A$8,A13,$F$2:$F$8,">0")
Adjust your ranges as appropriate to fit your workbook. Hope this helps

Excel Sum product values and stock then multiplie when multiple criteria

So I have this information:
+---------------+---------+-------+------------+
| Chocolate | Brand | Stock | Sale value |
+---------------+---------+-------+------------+
| Chokito | Nestlé | 1520 | $3,50 |
| Snickers | Mars | 3300 | $5,20 |
| Snickers 2 | Mars | 500 | $2,50 |
| Kit Kat | Nestlé | 2000 | $9,10 |
| Double Decker | Cadbury | 1000 | $2,50 |
| Idaho | Mars | 0 | $6,10 |
| Caramello | Cadbury | 350 | $7,50 |
| Cadbury Daily | Cadbury | 1000 | $3,10 |
| Almond Joy | Hershey | 500 | $1,50 |
| Twix | Nestlé | 999 | $4,50 |
| Zero Bar | Hershey | 488 | $5,50 |
+---------------+---------+-------+------------+
Wha I want to get the total stock value for each brand. I get these values by inserting a column of of stock * value then doing a Pivot Table
Cadbury $8.225,00
Hershey $3.434,00
Mars $18.410,00
Nestlé $28.015,50
But what I want to do is a formula in Excel that will get this same values.
I first tried using SUMIF but obvioulsy it didnt worked xD
I cant think of any other formula
Thanks for your help
Try,
=SUMPRODUCT((C$2:C$12), (D$2:D$12), --(B$2:B$12=G4))
For a dynamic length of data,
=SUMPRODUCT((C$2:INDEX(C:C, MATCH(1E+99, C:C))), (D$2:INDEX(D:D, MATCH(1E+99, C:C))), --(B$2:INDEX(B:B, MATCH(1E+99, C:C))=G4))
Alternative approach using sumif
Place the following in E2 and copy down
=D2*E2
this will give the value you of each individual chocolate level in stock
in column G generate a list of brands
in H2 use the following formula and copy down as needed
=SUMIF(B:B,G2,E:E)

Count text occurrences in a column in Excel

I have the following list in Excel:
+-------+----------+
| am | ipiresia |
+-------+----------+
| 50470 | 29 |
| 50470 | 43 |
| 50433 | 29 |
| 6417 | 51 |
| 6417 | 52 |
| 6417 | 53 |
| 4960 | 25 |
| 4960 | 26 |
| 5567 | 89 |
| 6716 | 88 |
+-------+----------+
I want to add a column, let's say 'num' and count the occurrences of column 'am' in a row adding one when a new occurrence happens as follows:
+-------+----------+-----+
| am | ipiresia | num |
+-------+----------+-----+
| 50470 | 29 | 1 |
| 50470 | 43 | 2 |
| 50433 | 29 | 1 |
| 6417 | 51 | 1 |
| 6417 | 52 | 2 |
| 6417 | 53 | 3 |
| 4960 | 25 | 1 |
| 4960 | 26 | 2 |
| 5567 | 89 | 1 |
| 6716 | 88 | 1 |
+-------+----------+-----+
Is it possible to get this automatically with a formula in Excel?
yes,
my example:
(assume you start your table containing 3 columns at Excels origin at A1 without header lines)
Then fill C1 with value "1"
and then start in C2 with entering a formula
simple like this:
=if($A2=$A1;$C1+1;1)
then you drag C2 down at the cells downright located autofill position as far as you want. Most times also double click works to let Excel autofill the columns down to the end of you prefilled table.
If you need assistance for AutoFill press F1 in Excel an the help with tell you in detail.
Assuming the sample table starts at A1 (with headers) the following formula will provide the expected results even if the list is not sorted.
=COUNTIF($A$1:$A2,A2)
Enter the formula at cell C2 then paste it down to the last cell of the data (or use AutoFill)

Resources