I am trying to write a sum for a column but i need it to display a ERROR at the bottom where it sums if any cell contains text.
Any ideas
Thanks
I am trying to write a sum for a column but i need it to display a ERROR at the bottom where it sums if any cell contains text.
Any ideas
Thanks
Hi, welcome to the forum
probably a simpler way of doing this, but try...
=IF(COUNT(J1:J4)=COUNTA(J1:J4),SUM(J1:J4),#VALUE!)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
This is an alternative (no simpler!!):
=IF(ISERROR(SUMPRODUCT((A1:A4)*ROW(A1:A4))),"Error",SUM(A1:A4))
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.
Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh
Or:
=IF(SUMPRODUCT(--ISTEXT(A1:A4)),"#VALIE",SUM(A1:A4))
Or,
=SUMPRODUCT(--A1:A4)
Regards
Bosco
Yes.... I forgot about the --. Neat!
See? Told you there would be a simpler way, nicely done Bosco
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks