Search code examples
exceldiagonal

Excel formula with diagonal


I have a question for executing quickly.

enter image description here

A1:C3 is original. I want to create a new based on it and F1:F3.
A8 is A3 / F1.
A7 is A2 / F2.
A6 is A1 / F3.
B7 is B2 / F1.
B6 is B1 / F2.
C6 is C1 / F1.

I want to use formula to do this rather than input A8 = A3/F1. And do it many times in each cells.

How can I do?


Solution

  • This formula should do it:

    =IF(A1<>"",A1/INDEX($F$1:$F$3,1+(ROW()-ROW($A$6)+COLUMN()-COLUMN($A$6))),"") 
    

    You have to put it in A6 and copy it to the other cells.

    (@Rob Gale: ok :-) )

    First you have to check for empty cells (A1<>"").

    Then the numerator of the division is simply a reference and can easily copied between the formulas (A1).

    The tricky one is the nominator. The sum of the row and column offsets of the respective cell is calculated and used as index into the 'percentage range' in column F.