![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 8
|
As indicated below, I have a row in which "1's" are placed manually. I would like a formula that would sum the range from A1:F4, but give a value of 3 because there are only 3 rows to which "1's" are placed located in. I tried using the countif function, but that doesn't seem to help me much.
A B C D E F 1 0 1 1 0 0 0 2 0 1 0 1 0 0 3 0 0 0 0 0 0 4 0 1 0 1 0 0 Thanks in advanced, cheers. you can e-mail me directly @ lmashaud@bdp.ca |
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Howdy. Hate to over simplify the issue, but is it possible to sum the rows in g and then do a count if on the summed column for cells greater than zero?
E.g., in g1, =sum(a1:f1) and so on. In g6 =COUNTIF(G1:G5,">0") Hope so. Cheers, Nate [ This Message was edited by: NateO on 2002-03-11 08:30 ] |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: Horley Surrey England
Posts: 7
|
SUM row 1,2,3,and 4 in column G.
Then enter a =COUNTIF(G1:G4,">0"). Should give you an answer of 3. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 8
|
Thanks for your help!!
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
{=SUM(IF(FREQUENCY(IF(A1:F4,ROW(A1:A4)),ROW(A1:A4)),1))}
Note: This is an array formula which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|