# Table Of Calculations Down To A Single Array Formula

Feb 9, 2010

I'm trying to condense a table of calculations down to a single array formula, but am getting stuck on one piece of it.

The table data is very simple, and can be in just two columns:

1, value
2, value
3, value
4, value
5, value

Where 1 thru 5 are time periods, and values are various numbers.

I want to perform the GammaDist function on each value. It requires a time period input, and in this case it is the 1 thru 5 in the table. So at the end of period 5, the formula for the first value would be

=Gammadist(5,x,y,TRUE) (x,y values not important here)

and the formula for the second value would be:

The only thing that changes is the period number.

So, my goal is to write an array formula that will sum the GammaDist for each of the 5 rows, for all timeperiods (which is 5 in this case)

I can get this far:

But this passes 1 thru 5 to all rows, I only want 1 thru 5 passed to row 1, 1 to 4 passed to row 2, etc.

## Is A Single Formula Better Than Intermediate Calculations?

Feb 2, 2010

I come from a (procedural) programming background, where we perform operations step by step. I tend to use intermediate calculation columns, with only 1 or 2 calculations per formula, or, failing that, use a UDF. I find this easier to debug and maintain.

The solutions I see tend to give the result in one formula. This reminds me of the functional progamming languages I used years ago. I'd like your opinions on what is best-practice, or common practice, in relation to constructing formulas, so that I can improve my development.

## Formula To Multiply Single Value By Array Then Sum?

Mar 29, 2013

I am looking for an excel formula that will allow me to perform the following logic: if a cell value in (M3:BA3)="D" then multiply C29 by the corresponding value in (M29:BA29), then sum all of the products.

## Single Cell Array Or Sumproduct Formula

Jun 16, 2009

To calculate the result for a month is easy, but I can't figure how to get a single cell formula to calculate for the year. The sample attached explains it better.

## Single Conditional Array Formula To Sum Occurrences In Range Of Cells

Mar 28, 2014

I'm trying to find a single conditional formula which summarizes multiple text occurrences in a range of cells. I managed to summarize the occurrences in a single cell, but my challenge is that I'm looking for a single (array?) formula for this.

I have a worksheet with column A which contains the condition and column B which contains a text field. I'm looking for a single formula to summarize all the 'AB' occurrences in the cells B4..B11 where the column A is Apple. I managed to do this by using an additional column (column C), however as my worksheet contains over 10000 rows, I would like to use a single conditional (array?) formula summarize the AB occurrences (multiple ' AB's can occur in a single cell) in stead of having to use an additional field per row.

I have attached a sheet as an example. I'm looking for a single array formula in cell C11 which summarizes the 'AB' occurrences in cells B4..B11 where column A is Apple.

## Do 3 Seperate Calculations In A Single Cell And Desplay Those Results

Nov 2, 2009

Is it posible to do 3 seperate calculations in a single cell and desplay those results? For example in a single cell: A1+A2 | A3+A4 | A5+A6|

Where:
A1 = 1
A2 = 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6

Results Display: 3,7,11.

## Calculations On First Lines For Entire Groups Of Data In Single Column?

Feb 25, 2014

I'm looking to do some simple maths with ranges in Excel but I'd like a way to be able to input all these formulas automatically although I am pretty sure a single formula per column could do it all automatically. I've got to put the sums in AD to AF on the first line of each location, but the maths is for the entire location's range.

[URL]

## Formula For Table Array

Jul 6, 2009

In a spreadsheet I have a large table in one tab with a row of numbers, and column of numbers with an array of numbers under each.

Closes example I could find on google is ....

## VLookup Formula - Table Array

Jun 7, 2014

I am currently using the following formula:

=VLOOKUP(\$A\$3, Sheet1!A:B, 2, 0)
=VLOOKUP(\$A\$3, Sheet1!C:D, 2, 0)
=VLOOKUP(\$A\$3, Sheet1!E:F, 2, 0)

The problem is I am trying to get the table Array portion (A:B , C:D , E:F etc.) to auto fill when I drag it across and it will but not correctly. How to autofill with the pattern that I need?

Currently it would auto fill with D:E , F:G, H:I G:H I:J

## Sorting Table With Array Formula?

Mar 17, 2014

I'm trying to sort a table as displayed in the image below. The table consisting of items in column A, here fruits, and a column E where totals over three month is displayed.

I have entered an array formula in column H where the total of each fruit is summed and then sorted in descending order. My problem is that whenever two fruits have equal value (here, apple and pear), Excel will not manage the display of both fruits, it will just display the first twice. The formula in column I is a simple SUMIFS.

It doesn't matter if Apple or Pear is displayed first, but I need both items to be displayed in column H.

excel1.png

## Array Formulas Causing Slow Calculations

Dec 24, 2007

I have an Excel file that has a certain amount of Array Formulas. It takes 30 seconds to calculate every time the user makes a change. Some users do not have the Status Bar showing, and they think that Excel is "locked up". I want to make a user form that will appear when the Stats Bar is "Calculating..." There are a lot of "progress indicator" tutorials on this site, but they all seem to relate to VBA code being inserted in between certain lines. That doesn't apply. My Excel file has no VBA. It just takes a long time to recalculate. I want a VBA form to appear, that will match the % progress shown on the Status Bar, whenever a change is made to the spreadsheet.

## Help With Variable Table Array In Vlookup Formula

Dec 11, 2007

I'm working on a project in Excel (for a restauraunt) and I basically need to make a formula to work out what an item is, using it's ID number and referencing the certain menu that it is in.

as you can see the table array is defined in cell E3, but i still get a #N/A result, and when I replace the "E3" in the formula with "Deserts" it produces a result.

## Adding Formula To Table Array In VLookup Function?

Aug 29, 2013

I am looking to be able to alter my table_array section in VLOOKUP to adjust in date.

exampe: =vlookup(A4,'[Daily report - August 25.x;sx]Facilities'!A4:AY100,84,FALSE)

and I want to be able to change the August 25 -> August 26 repeating so that as I drop the next date in it will update to the correct tab.

I have the dates above so if I could somehow just the date to another cell instead that would work as well. I just do not know how.

Essentially I need to grab data from a separate workbook everyday and compile it to one master list.

## Change Table Array Reference Without Changing Formula In Every Worksheet?

Jun 25, 2014

i want to change the table_array reference without changing formula in every worksheet. I tried using a new worksheet and naming it the same as what is referenced in vlookup table_array but it messed up all the data.

I have to use a different worksheet every month so need a way to change reference OR how to change array data without messing up the worksheets with the vlookup

## Table Array Sheet In VLookup Formula Be Based On Value From Another Cell

Mar 4, 2014

I would like to have vlookup formua. And I would like the sheet for the table array section be linked to a cell value. So in my workbook this is my vlookup formula:

=VLOOKUP(B2,sheet1!B2:C8,2,FALSE)

I would like to to be something like =VLOOKUP(B2,(=b3)!B2:C8,2,FALSE). This way I can change the value in B3 and the vlookup formula will look for values in a different sheet as opposed to the one I originally designated in the formula.

Here is my workbook: Book1.xlsx

## Array Formula Not Expanding To Match Lines Added To Table?

May 3, 2014

I have a number of array formulas that refer back to the table in the top left. The array formulas are in Columns I and L, and cells N200, N203, and P203.

Normally when I add a new line to the top left table (usually by clicking on the empty box below the previous final line and typing the date), the table expands by one row and the array formulas all adjust to match, i.e. all the A180/C180s in the formulas become A181/C181s, etc.

However every once in a while (maybe once a month), the arrays simply refuse to update, and I can't figure out why. When they fail, they all fail, it's not hit or miss. You'll see in the attached sheet that though I've added a line to the table (A181) and data to that line, all the arrays still read through A180/C180.

Why this randomly fails to update, and if it's something I'm doing incorrectly?

And that leads to an associated question. In the past when this has failed in this manner, I've laboriously gone through and changed all the cell references manually, in every single individual cell. (After doing it once, the arrays usually magically start auto-expanding again.) I'm certain there is a way to make those formulas refer to a named range, instead of all being manual references, but after spending an hour on it, I keep getting #VALUE errors.

I've been using [URL] ..... and pages like it as a reference without success. Obviously, I would prefer that the formulas auto-update without issue per my first issue above, but in the event that they don't, it'd be really nice to just change the ranges in one location and have that propagate across the sheet.

## Add Columns With Calculations In A Pivot Table

Nov 2, 2012

I have two queries regarding pivot table.

I would like to include additional columns with formula in to a pivot table

I would like to get ride of the Items in a pivot table with Zero values without editing the source data.

I have attached a work file in to the below link, [URL]....

## Pivot Table Arrangement But Without Calculations

Apr 25, 2014

I am trying to get my data to be visualized on a monthly basis. A Pivot Table works perfectly in getting the right arrangement, except that it performs a calculation in the values summary field. Is there a solution that allows the Pivot Table to plop the actual text values that it is pulling from? Maybe Excel Pivot Tables aren't the right solution, so maybe another type of software might be useful? Or perhaps a change in the VBA script? The original table looks like this:

ID Description Date Code Building
10223 Package/Split 02/01/2015 ALRM1 A
10223 Package/Split 02/01/2015 PLMB1 A
10992 Pump Test 03/13/2015 ALRM1 B
10992 Pump Test 03/13/2015 PLMB1 B
10992 Pump Test 03/13/2015 ALRM1 B
11432 Inspection 03/13/2015 ALRM1 C

The way I would like for it to look is this:

January February March
Building ID Description Building ID Description Building ID Description
A 10223 Package/Split B 10992 Pump Test
C 11432 Inspection

In the original report, there can be multiple codes for the same ID (ALRM1 and PLMB1 for 10223). In such cases, Pivot Table works by summing up the values, therefore displaying the ID in just one row. I would like for it to do the same thing (spit a multiple row ID as one row) but display the actual text values of Building, ID, and Description as shown. I don't need the code in the table, but it's there in the original data simply to differentiate between the two IDs.!

## Approximate Value Calculations From 1 Table To Worksheet?

Jul 9, 2014

I have a worksheet that tabulate from several sheets. I have need to a field populate from a table when the value is not exact and i cannot arrange a formula correctly. The cell issues is highlighted in yellow. When a value is placed in cell r2 i need it to correctly place the value in s2 using the table from the other sheet. I have attached for review.

## Populating A Table For Gear Calculations.

Jan 12, 2010

I have a list of numbers (each corresponding to a different available gear). I have four columns and am trying to populate those columns with all the possible variations without using the same gear twice in any one row. Is there any way of doing this automatically or with a script or something? There are 16 different gears so it could be rather time consuming to input all variations manually.

The attached worksheet has what I am trying to do begun. The possible number of iterations or variations is apparently enormous and am hoping for an automated way to populate those cells.

## Data Table Suspecting - Stuffing Up Excel Calculations?

Sep 5, 2013

I have built a model which has approx 33,000 different combinations (output) based on user selection. There are 15 different options for user selection which gives rise to the number of outputs (2^15 -1) = 32,767.

I have inbuilt a data table that gives the output for all of the 32,767 scenarios. However, it seems like for each change the calculations takes forever and I am not sure when the calculations are complete. Saving takes forever and stuffs up excel. The numbers keep changing in front of my eyes. The file is 10Mb big/small.

## Adding Columns With Manual Calculations To Dynamic Pivot Table

May 8, 2013

I have a problem as I need to present data with different data sources. I'd like the calculations to be as "automatic" as possible. The data consists of countries and regions and their sales pipe. The pivot table doesn't give me all the data that I need to present so I need to add extra columns with calculations and data from other data sources.

The problem I meet is that the 'total row' within each group needs to be reflected in my columns as well (F:G) It works as long as the data I've imported has the same amount of States within each group of Contry but if the number of states differs with the newly imported data - my "manual" columns are wrong.

(A;B;C;D;E;F;G;H)
Country;State; Red; Amber; Green; Quota; Total PV; Coverage;

I've created a Pivot table on the first 5 columns [Country; ...; Risk] (A:E)

The following columns are manually entered based on the pivot (F:H)

Quota (data source from another sheet)
Total PV (a sum of Red; Amber; Green in the Pivot)
Coverage (returns % of TotalPV/Quota)

For each group Quota and Total PV needs to summarize the above data within the group. I've 'hard coded it' today (SUM(F3:F5)) - F3:F5 can as well be F3:F8 or F3:F4 depending on the imported data. I have 8 different Countries (groups) with different amounts of States and 3 different sheets for each Region of countries so I need this summary to be automatic based on what group (Country) it belongs to. How can I make the calculation different so that it's dynamic as well as the Pivot table? Today it's not dynamic and it needs my 'hands on'.

Quota =IF(ISNUMBER(SEARCH("total";A6)); SUM(F3:F5); IF(ISNA(VLOOKUP(B6;Quota!B:F;3; FALSE));" ";
IF(VLOOKUP(B6;Quota!B:F;3; FALSE)=0; " ";(VLOOKUP(B6;Quota!B:F;3; FALSE))))).

## Get A Single Cell To Look At An Array

Mar 10, 2009

What I�m trying to do is get a single cell to look at an array, if there is a number in that array which is between 2 limits to return that number. This is eventually going to work with limits of dates/times, and have to be updated once a day. I�ve attached a workbook with an example of the data and the way I want it formatted. {=IF(AND(A1:A25>=D32,A1:A25<E32),A1:A25,"")}

But this always returns a false. I can get it to work without using array and just having cell to cell logic but this means I would need the same amount of columns in the formatted data as the raw which is impractical.

## Array Of Values To Single Column?

Aug 16, 2012

Ok I'm writing an extraction formula. I've got my array of Trues and Falses, but now I need to go through each row and check if all the columns are TRUE, and then return the row if all the columns are true.

Right now I'm just working with a dummy set of data... my real table is some 50 columns wide and over 300 rows, but this gives you the idea of what I'm doing:

I tried putting in a Countif and using it like and array to count the different rows and return the number of times each row was returned... but countif goes nuts when you try an array for the criteria.

Formula:
=IF(IFERROR((\$H\$2:\$J\$13/B\$1:D\$1)>=1,TRUE),1,0)*IF(IFERROR((\$H\$2:\$J\$13/\$B\$2:\$D\$2)

## Single Element Of An Array Is Equal To A Particular Value

Jun 20, 2008

How can you test that no single element of an array is equal to a particular value?

## Sumproduct Of 2 Criteria In A Single Array

Jul 16, 2007

I want to use Sumproduct function to sum up the values that belong only to Product "PXT" and "PCT". I enter it as array but my formulae doesnt work. can someone give me a hand. Here is my formulae: =SUMPRODUCT((C2:C10="PXT")*(C2:C10="PCT"))*(A2:A10)

ABCD
1ValueQtyProduct
2299.944PXT
3186.53PXT
4711.071PCA
5561.862PCT
6608.961PXT
7520.026PCT
8427.682PCA
9397.341PCA
10387.664PCT

## Add Zeros After Formula Calculations?

Sep 17, 2013

I have A1 that contain numbers, B1 that contain number, and i want to multiply those 2 and at the end of result i want to add zeros on front. Let me give you an example:

A1 field has data :00.375B2 has data: 6.49 C1 has the multiply result of A1+B1: 2.43 (But i want when the calculation is done and have the result 2.4 to add 2 zeros on front and become: 002.43 or if the result is for example: 65.20 to add 1 zero on front and become 065.20 , and if the result is 102.20 do not add anything on front.

So in total i need to have the 5 digits of number.

## Irr Calculations / Formula For Investment

Dec 17, 2008

I have a specific problem on irr calculations. In the excel file, I have following data.

date of investment - 1st May 2008
Investment Value - 1000000
Investment close date - 15th Dec 2008
Closure value - 1055000

I want to calculate IRR for the investment for the days the money got invested.
How do I calculate this in excel.

## Conditional Format Array From Single Cell

Feb 25, 2009

This has been kicking my can all morning! Should be simple. I'm trying to conditionally format an array from the value of a single cell.

=IF(A1<80, A3:A24,RED,0)
=IF(A1>80,A3:A24,GREEN,0)
=IF(A1>120,A3:A24,BLUE,0)

## Text String To Single Character Array?

Jul 13, 2012

There is a method to use ROW(1:10) within an array formula to strip a string into individual elements e.g.

HELLO > {"H","E","L","L","O"}

I cannot find it anywhere, thought it was something like =MID(A1,ROW(1:10),1) but not yielding results.