Add Diagonal Elements in Excel

Chakku

New Member
Hi Team,

I have an excel of 4*4 in which all the cells are filled with numbers.In that i am supposed to add the diagonal elements and then store the values in an data item. Can anyone help me in this. I would appreciate that.




Thanks in advance,
Chakku
 
Hi @Chakku,

I have got the desired result as per your requirement.

added diagonal elements in below direction of Red, I have also done in reverse direction i.e from D2 onwards to A5
View attachment 1573125064908.png
1. Get excel to collection
2. Set the initial cell ref as "A2", as we want to start from there.
3. Make loop of collection and use GO to Next Cell action of MS Excel VBO in which Rows , columns should be 1.
4. Once output of above action gives you the cell ref then use Get cell value action to get value out of it.
5. in loop have calculation stage to add all cell values

Hope its helpful, Please let me know if you understand , I have also made the process and tested it with above cell reference attached.
 

Chakku

New Member
Hi @shikhar.mishra

Thanks for your help it worked fine

One thing i have changed is
(3. Make loop of collection and use GO to Next Cell action of MS Excel VBO in which Rows , columns should be 1. )
i have added row as 1 and column as 1 in GO to Next Cell ...so it parsed diagonally.


My query is that i have to paste that in an cell value say- "E7" which is text and after all the calculations i got the desired answers in Number, i couldn't find the property to paste that. Can it that be placed/pasted?
 
Top