Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2008

Tip: Looking for answers? Try searching our database.

Countif non consecutive columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shamor - 29 May 2008 14:04 GMT
I have the following:
                                   Attended         Attended
     A                B               C         D         E        F
1 John Doe         x               Y         x         N       ____

Column B and D with the x are if they are to attend and column C and E are
whether they attended or not and it continues for several other courses.

How do I sum or countif the nonconsecutive columns are Y? It will be column
C, E, G, I etc but the same row. I need to tally how many they actually
attended vs not attned in another column next to it.

Thank you! Hope this makes sense!
Brad - 29 May 2008 14:56 GMT
This is one way
=--(C2="Y")+--(E2="Y")+--(G2="Y")

added cells +--(I2="Y") as needed
Signature

Wag more, bark less

> I have the following:
>                                     Attended         Attended
[quoted text clipped - 9 lines]
>
> Thank you! Hope this makes sense!
shamor - 29 May 2008 15:25 GMT
This does not work it gives me a true statement and it counted a "N" as true.

What I need is for it to count or sum a total in number format of the "Y" in
the non-consecutive columns. That column could be a Y or N and I need to
count the Y in non-consecutive columns across a spreadsheet.

Thanks!

> This is one way
> =--(C2="Y")+--(E2="Y")+--(G2="Y")
[quoted text clipped - 14 lines]
> >
> > Thank you! Hope this makes sense!
Brad - 29 May 2008 15:35 GMT
I tested this on my computer before posting and it provides the correct number.

Only counting the "Y" as one....

Like to figure the problem out with you.  Please check to make sure that you
are adding up the correct cells.  (Tracing dependents can make sure that you
are not off a row or two...)  Can you post the equation that you have entered?

Signature

Wag more, bark less

> This does not work it gives me a true statement and it counted a "N" as true.
>
[quoted text clipped - 22 lines]
> > >
> > > Thank you! Hope this makes sense!
shamor - 29 May 2008 16:09 GMT
I have done the below 2 formulas and they didn't work:

=G2(G2="Y")+K2(K2="Y")+O2(O2="Y")
=--(G2="Y")+--(K2="Y")+--(O2="Y")

Now I did this one and it worked but I have to identify the entire row and I
didn't want to have to do that in case I have to add a column that requires a
"Y" answer but does not need to get counted in that end result.......

=COUNTIF(F2:AM2, "Y")

Thanks much!

> I tested this on my computer before posting and it provides the correct number.
>
[quoted text clipped - 30 lines]
> > > >
> > > > Thank you! Hope this makes sense!
Brad - 29 May 2008 16:31 GMT
I'm currently working in Excel 2007

In the Formula dropdown there is an "Evaluate Formula" options (2003 has the
same function the was to access it might be slightly different) - when you
evaluate the formula where does it not give you what you expect...

By the way Peo's answer is a more elegant answer than mine but it
essentially does the same thing.....
Signature

Wag more, bark less

> I have done the below 2 formulas and they didn't work:
>
[quoted text clipped - 43 lines]
> > > > >
> > > > > Thank you! Hope this makes sense!
Brad - 29 May 2008 17:05 GMT
Shamor

I would like you to use the middle formula
=--(G2="Y")+--(K2="Y")+--(O2="Y")

Signature

Wag more, bark less

> I have done the below 2 formulas and they didn't work:
>
[quoted text clipped - 43 lines]
> > > > >
> > > > > Thank you! Hope this makes sense!
Bob Phillips - 31 May 2008 21:14 GMT
If you use a + operator, the -- is superfluous.

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Shamor
>
[quoted text clipped - 63 lines]
>> > > > >
>> > > > > Thank you! Hope this makes sense!
Peo Sjoblom - 29 May 2008 15:43 GMT
As long you are counting every other row you can use this

=SUMPRODUCT(--(MOD(COLUMN(C2:Z2),2)=1),--(C2:Z2="Y"))

Signature

Regards,

Peo Sjoblom

> This does not work it gives me a true statement and it counted a "N" as
> true.
[quoted text clipped - 27 lines]
>> >
>> > Thank you! Hope this makes sense!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.