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.

View 3 Replies


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.

View 9 Replies View Related

Intermediate Formula To Count Different Content?

Apr 2, 2014

Column A has (say) 5 cells.

A1 = R, A2 = R, A3 = O, A4 = R, A5 = O

I need to count the Rs and Os separately

So column B ends up with B1 = 1R, B2 = 2R, B3 = 1O, B4 = 3R, B5 = 2O or at least B1 = 1, B2 = 2, B3 = 1, B4 = 3, B5 = 2 so i can later say =B1&A1 to merge them into what i need.

View 2 Replies View Related

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|

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

Results Display: 3,7,11.

View 3 Replies View Related

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.


View 3 Replies View Related

Intermediate Training Content

Aug 30, 2007

My boss is making me teach an Intermediate Execl class that will last about 55 min to a wide skilled class. Does anyone have any suggestions on what to show the group. I was think of 4 topics but not sure.

View 6 Replies View Related

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.

View 4 Replies View Related

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.

View 2 Replies View Related

Calculations Based Off Formula From Another Cell

Jul 8, 2014

I'm trying to do two things:

1. I'm trying to show the formula of specific cells in the work sheet. So far I've only found out how to show formulas on the entire worksheet. I imagine there has to be some way of me doing this without using macros.

2. Here's the doozy. What I'm trying to do is use the base code for a formula that is stored in one cell (Formula Page: B5:B7) and apply it to other cells (Calc Page: C4:C6). In other words, I want to apply the cell formula from B5:B7 to the cells C4:C6 and use them to calculate the TOTAL COST. I want it so that whenever I manipulate cells B5:B7, they are also appropriately manipulated in C4:C6.

Please see attached for reference. Attachment 33077

View 14 Replies View Related

Geometry Formula For Circle Calculations

May 10, 2009

See attached photo. I need a formula to calculate the length of line c1. I know the diameter of the circle, and the number of segments. In the photo there are 8 segments but this will change.

View 2 Replies View Related

Variable Number For Use In Formula Calculations

Jun 19, 2008

I have a formula that will be used by others to obtain a certain result by altering a number in the formula. What I would like to do is make that number obvious as the one that can be changed. The formula reads - "=(M48+P48+Q48)*0.08453-(((J48+K48)*$K$4)*0.1)" -what I would like to do is color the 0.08453 in the Formula Bar so it stands out.

View 4 Replies View Related

Sumproduct Formula Causing Slow Calculations

Aug 23, 2007

I have the following formula in 220 cells in a workbook:

=( SUMPRODUCT(('General Journal'!$C$1:$C$44995>=$D$3)*('General Journal'!$C$1:$C$44995<=$E$3)*('General Journal'!$H$1:$H$44995=$A5),'General Journal'!$I$1:$I$44995))+(SUMPRODUCT(('General Journal'!$C$1:$C$44995>=$D$3)*('General Journal'!$C$1:$C$44995<=$E$3)*('General Journal'!$J$1:$J$44995=$A5),'General Journal'!$K$1:$K$44995))+(SUMPRODUCT(('General Journal'!$C$1:$C$44995>=$D$3)*('General Journal'!$C$1:$C$44995<=$E$3)*('General Journal'!$L$1:$L$44995=$A5),'General Journal'!$M$1:$M$44995))

Where D3 is a starting date, E3 is a closing date, and A5 is a sorting code. It looks at my general journal and looks for all the entries between the two dates, and then sums up all the entries linked to the sorting code in A5. The sorting code is in column H, and the amount to sum is in column I, and this is repeated 3 times.

You are already probably signering at how long I must have to wait while excel calculates all these formulas (* 220). I have resorted to a macro that turns caluculation to manual when I open this workbook, and back to auto when it closes.

View 8 Replies View Related

Change Event For Conditional Formatting Not Firing On Formula Calculations

Sep 25, 2007

I have used the code for formatting: This works fine when typing in the numbers manualy but if I have a formula (eg:A1=b1+c1) and a1 = 15 nothing happens. Is there an update button or a better way to do this?

View 2 Replies View Related

Combining Formula Into A Single Formula?

Dec 23, 2013

I have 2 formulas which I want to combine into a single formula.

Both are correct and work in isolation, but when I attempt to combine them, the syntax is incorrect.

Here is the first:


The formula is dependent on a single user selection from a drop down list. If the user selects YES, the cell in which the formula resides displays YES, otherwise NO.Here is the second:


View 4 Replies View Related

Single Formula For Counting In Range

Feb 25, 2014

Is possible write a formula in one cell and count how is certain seasons?

I want instead criteria argument in the function =COUNTIF(range,criteria) set formula.

Instead criteria argument inside Countif function I want to use a formula on this link

Attached file : Lookup formula Date to Season.xlsx‎

View 13 Replies View Related

Incorporate Several IF Statements Into Single Formula?

Nov 27, 2012

I am trying to incorporate several IF statements into a single formula:


What I am trying to achieve with this formula is:

- insert LR if AB5 is less than 20;
- insert C if AB5 is less than 30 but more than 25;
- if neither of the above is true, insert CLEAR if T5 contains something and if not insert B-T1-F10 if AB5 is between 240 and 40 and AA5 = 1.

The problem I have is that the B-T1-F10 is not being inserted where the other criteria are not met so I think I have not integrated the statements correctly?

View 1 Replies View Related

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.

View 2 Replies View Related

Running Total Formula In Single Cell?

Mar 28, 2014

I am creating a spreadsheet for inventory use. I want to have a running total in (1) cell based upon a new/different number being entered into a different cell.

Column B, Row 1 (This will be a new/different number entered every day - inventory in or out, so positive or negative number) Column D, Row 1 (This will be a running total based on numbers inserted in previous 2 columns)

Basically what I have is a key inventory. So there is column A with key number, B should be keys IN, C should be keys OUT, or ideally B would be IN and OUT meaning, for inventory IN input a positive number and for inventory OUT input a negative number, and D Should be total.

Column E represents number of keys currently in the inventory. I was going to hide the current inventory column so all you see is IN/OUT and total. So what I need is to be able to just come in and type in a number in the IN and/or OUT column, without having to add/subtract it with the number already in that column.

Bottom line, I'd like to be able to use IN and/or OUT columns to just type in numbers as they come and not have to worry about what's already in those columns and get correct total number.

View 5 Replies View Related

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.

View 4 Replies View Related

Using Formula To Separate Data In Single Cell?

Oct 15, 2012

formula to separate information in a single cell into multiple columns. I have hundreds of rows of data, so a formula to quickly separate the information into individual columns would be good. Below are a few lines of data.

ALMADEN STATION* 900 227 168 182 176
OAKRIDGE STATION* 900 276 332 362 349
OHLONE‐CHYNOWETH STATION* 900 469 480 522 504
ALUM ROCK STATION 901 947 925 1007 972
BAYPOINTE STATION 901 181 196 213 205
BONAVENTURA STATION 901 137 140 152 147
CAPITOL STATION 901 650 680 741 715
CURTNER STATION 901 569 571 621 600
ORCHARD STATION 901 87 94 91

View 6 Replies View Related

Formula To Work Where It Will Search A Single Cell

Feb 27, 2009

I am trying to get a formula to work where it will search a single cell (on a sheet called "Calls") to see if a particular code is in there, if so return a value using HLOOKUP from a table on a sheet called "Values". The problem I am having is how to use the wild card etc because everything I have tried returns an error...

The code I am trying (Without wild cards, because they all failed) is...

Code: ....

View 10 Replies View Related

Formula That Reads Off A Single Cell At The Moment

Sep 17, 2009

i have a formula that reads off a single cell at the moment.

=IF(N38="MB","KL","MB") this works fine. I need the this to read off a range of cells from N38 to N43.

View 9 Replies View Related

Changing Single Formula Range With Input Values?

Aug 7, 2014

I have data in column A and formula in D2 is =MAX(A1:A1)

If i enter 12 in B2 cell
....... and 5 in C2 cell formula in D2 should change to =MAX(A12:A17)

If i enter 140 in B2 cell
........and 30 in C2 cell formula in D2 should change to =MAX(A140:A170)

I tried entering INDIRECT function inputting value in B2 as A12 instead only 12 but not fully succeeded

View 2 Replies View Related

Excel 2010 :: Multiple Formula For Single Cells?

Feb 18, 2014

I'd like to apply multiple formula to a set of cells on a summary page. My summary page also contains 3 variable dropdowns, and I'd like to display data based on the text selected in those dropdowns (pulling data from 2nd tab "Variables")

The following formula works in the first instance:

=IF(AND(H4="Product Type A1", H6="External", H8="Existing"), Variables!C4, 0)

What I'm struggling to do is add additional formula to the same cell in order to deal with the remaining eventualities of the drop down variables:

Variable 1:
Product Type A1
Product Type A2
Product Type B1
Product Type B2

Variable 2:

Variable 3:

Or am I better using a VLOOKUP or something?

View 2 Replies View Related

Rolling & Average (write A Single Formula That I Can Copy Down)

Mar 2, 2009

I've got a "Date" Column which has every day of every month, and next to that several columns with different types of data to correspond to a particular date.

To simplify this (because there are TONS of dates), I've made another "Date" column that displays only every 5th day. Now what I'd like to do of course is average the corresponding data over five days.

I don't know how to write a single formula that I can copy down that will do this.

I've attached a sample spreadsheet with only one month's data, the stuff I need a formula / code for is in red

View 2 Replies View Related

Formula To Combine Multiple Formulas Into Single Cell?

Mar 12, 2014

I'm looking for a way for Excel to combine formulas together into a more compact form for me.

Attached is a very simple version of what I want, my actual formulas are very complex but I'd still like a way to have them automatically combined into a single cell.

Alternatively, what is a good way to break down a very complicated one-cell formula and still keep things organized?

Here is the one-cell version of a formula I work with.

[Code] .......

That formula is difficult to work with in one cell, so on another sheet I have it broken down into parts so that if one part isn't doing what I want I can change it. This takes up a LOT of space because of the other steps I do (the above formula is just one step) and I'd like to combine it together.

Attached File : Excel Formula Combination Question.xlsx‎

View 7 Replies View Related

Filter And Count Unique Values In Single Formula?

Mar 18, 2014

I need to count the unique items in a range that don't contain the string "option". I would like not to use VBA for that but I can't make it work with a simple formula.

For now, I have :

[Code] ......

That doesn't count the cell with the content "option" and count correctly the other unique items. However I need to ignore any cell that contains the string "option" (with wildcards).

View 8 Replies View Related

Creating A Formula Based On Dimensions In A Single Cell

Dec 10, 2009

In my business I deal with a ton of different dimensions for my products. A lot of times the dimension will be within the cell as follows, "Product A 17x27 Brown", is in a single cell.

Is it even possible to write a code or formula that will find the "17x27" in the description, recognize it as a "dimension" and then run the formula that I need which is

View 18 Replies View Related

Formula That Will Test Text Conditions In A Single Cell

Apr 1, 2006

I need a function that will use a column of text values and test these values
to see if one or more of the values exist in a single cell. If it does I need
the function to return true or false.

Ie. cell A1 contains the text "Jim Smith" the B column contains the test
names (column of test values ) ie. B1 is "bill" B2 is "fred" B3 is "jim".
Because Jim is in the cell A1 I would need the function in C1 to return the
value "true". If A1 contained the text "bob smith" then function in C1 would
return the value "false".

View 10 Replies View Related

Multiple Cells Pointing To A Single Reusable Formula

Mar 30, 2007

I would like to know if you can point (lots of ) cells to use a formula specified once somewhere else. The problem I have is 6 large formulas duplicated down 6 columns for 7000 rows. This, it turns out has made my file size huge ! Instead of duplicated the formula, can I tell all the cells to use *this* formula, but remembering to increment the references within...

View 3 Replies View Related

Copyrights 2005-15, All rights reserved