# Find SUM of diagonal entries in a range of values

1. ## Find SUM of diagonal entries in a range of values

Hello,
I am using Excel 2016.

I want to sum all DIAGONAL entries ``Please Login or Register  to view this content.``
My current formula does not work for some reason. ``Please Login or Register  to view this content.``
I would think that this sums the entries from A1 to D4, if the column number is equal to the row number.
Which should equal 4.

I would greatly appreciate if anyone could let me know what is wrong with my formula
and what is/are the correct ways) of doing this.

Thank you!  Register To Reply

2. ## Re: Find SUM of diagonal entries in a range of values

Try array-entering this.

=SUM(IF(ROW(1:4)=COLUMN(A:D),A1:D4))

If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

 A B C D E F G 1 1 2 3 4 4 In F1 array-entered 2 2 1 3 4 =SUM(IF(ROW(1:4)=COLUMN(A:D),A1:D4)) 3 3 2 1 4 4 4 2 3 1  Register To Reply

3. ## Re: Find SUM of diagonal entries in a range of values

Thank you so much!  Register To Reply

4. ## Re: Find SUM of diagonal entries in a range of values

Mathfun,

You are welcome. Thank you for the feedback and the rep. I failed to notice this thread was your first post. My apologies and welcome to the forum.   Register To Reply

5. ## Re: Find SUM of diagonal entries in a range of values

Here's another one that's a bit more robust.

Data Range
 C D E F 5 26 0 89 68 6 95 97 91 85 7 5 92 99 24 8 16 87 35 87 9 ------ ------ ------ ------ 10 11 309

This array formula**:

=SUM(IF(ROW(C5:F8)-ROW(C5)=COLUMN(C5:F8)-COLUMN(C5),C5:F8))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.  Register To Reply

6. ## Re: Find SUM of diagonal entries in a range of values

And for the other diagonal??

16, 92, 91, 68  Register To Reply

7. ## Re: Find SUM of diagonal entries in a range of values

How about modify Tony's formula

=SUM(IF((ROW(F8)-ROW(C5:F8))=COLUMN(C5:F8)-COLUMN(C5),C5:F8))  Register To Reply

8. ## Re: Find SUM of diagonal entries in a range of values

Yes, I managed myself. Thank you FlameRetired.  Register To Reply

9. ## Re: Find SUM of diagonal entries in a range of values

You are welcome. Thank you for letting us know.   Register To Reply

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Tags for this Thread #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1