I have numeric values from columns A1 to E1 and I want to sum just the cells A1,C1,E1 and only the values that are greater than zero
A1 B1 C1 D1 E1
10 5 -5 20 10
The result should be 20 in this example
Any suggestions????
I have numeric values from columns A1 to E1 and I want to sum just the cells A1,C1,E1 and only the values that are greater than zero
A1 B1 C1 D1 E1
10 5 -5 20 10
The result should be 20 in this example
Any suggestions????
Last edited by chapysvp; 01-22-2013 at 02:58 PM.
Hi chapysvp
You could use SUMIF:
Formula:![]()
Please Login or Register to view this content.
Regards Kevin
Merged Cells (They are the work of the devil!!!)
If you have three cells with 10, -15 and 10 and you choose to ignore negative numbers, how do you get an anser of 10?
What is in the other cells? How do you choose which cells to sum? Is it always the same three cells? Or others?
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Im sorry I made a huge mistake, the values are in the columns not in the rows, a1,b1,c1,d1,e1, how to sum the values in a1,c1,e1 and only the ones on that cells that are greater than zero
=sumif(a1:e1,">0")
Hi
I tried your formula but that sum the cells b1 and d1 too, i just want a1, c1, and e1, is that possible?
To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
To attach a file to your post,
click advanced (next to quick post),
scroll down until you see "manage file",
click that and select "add files" (top right corner).
click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
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
Try one of these...
If you will never insert new columns before the range:
=SUMPRODUCT(--(MOD(COLUMN(A1:E1),2)=1),--(A1:E1>0),A1:E1)
If you might insert new columns before the range:
=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1),2)=0),--(A1:E1>0),A1:E1)
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Thank you Tony
That worked great![]()
You're welcome. Thanks for the feedback!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks