Hi All;
Need formula or macro to make sum for even cells (b(x),b(x+2),B(X+3)......
And sum for odd cells
Thanks
Hi All;
Need formula or macro to make sum for even cells (b(x),b(x+2),B(X+3)......
And sum for odd cells
Thanks
Is this what you meant?? If data are in A1 to a6:
even rows
=SUM(IF(MOD(ROW($A$1:$A$6),2)=0,$A$1:$A$6,0))
odd rows
=SUM(IF(MOD(ROW($A$1:$A$6),2)=1,$A$1:$A$6,0))
Both are array formulae. Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly braces yourself - it won't work...
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
May be
![]()
Please Login or Register to view this content.
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
Grate thanks alot
Hi Mr yaser
please see the attached
something wrong ?
regards
Hi Mr yaser
Last edited by mohadink; 09-28-2016 at 06:10 AM.
Hello Mohadin
What attachment do you mean? I didn't attach any files
Do you mean the attachment in Post # 2?
yes I did applied your UDF
It gave wrong results
Mohadink. Who are you talking to?
If you mean the odd and even numbers themselves so use my solution
If you mean the odd and even numbers for the rows regardless the values use Mr. Glenn's solution
Hi Glenn ...
your formulas are ok
thanks for your help,
the issue is the yaser's UDF is not working allright
sorry for miss understanding
regards
ok
so its Mr. Glenn"s
thank you
You're welcome
Please mark the thread as solved
You can edit both udfs in this line
Replace 'Value' with 'Row'![]()
Please Login or Register to view this content.
Regards
Double post...
Last edited by Glenn Kennedy; 09-28-2016 at 07:24 AM.
Glad to have helped you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks