Use the total value of one formula several times in a cell

I'm not sure how to explain this, I'm trying to run one formula to find information and use the result several times in one cell. I am currently doing this to display the requested value AND then run the same formula to find the average value.

Sample formula (simplified)

=<FormulaToFindValue> & " (" & Round(<FormulaToFindValue>/I52,2) & "/day)"

Acutal formula

=SUMPRODUCT((MONTH('W.A.R. 2016'!$A4:$A369)>=7)*(MONTH('W.A.R. 2016'!$A4:$A369)<=9)*('W.A.R. 2016'!$A4:$A369<TODAY())*('W.A.R. 2016'!Q4:Q369))  & " (~" & IFERROR(ROUND(SUMPRODUCT((MONTH('W.A.R. 2016'!$A4:$A369)>=7)*(MONTH('W.A.R. 2016'!$A4:$A369)<=9)*('W.A.R. 2016'!$A4:$A369<TODAY())*('W.A.R. 2016'!Q4:Q369))/B18,2),0) & "/day)"

As you can see, I need to use the same Formula twice in the same cell to get the result that I want, is there a way to only run the Formula once and use the resulting value several times? This is usually done by storing the value in a variable, but I cannot help but see a similar possibility in excel.

+4
source share
1 answer

Put the formula in the name (be careful to choose the appropriate choice between fixed and dynamic references to input ranges). Now this name can be used several times in a cell or in a book. In the example below, the formula is the sum of the product between two fixed ranges, and the nonsense formula in the specified cell uses this formula twice:

enter image description here

0
source

Source: https://habr.com/ru/post/1654145/


All Articles