LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default COUNTIF - more than one condition

I would add a separate countif

=SUM(COUNTIF(A2:Z2,{"CL";"PL";"SL";"UL"}))+(COUNTI F(A2:Z2,"H/D")/2)


--
Regards,

Peo Sjoblom




"Gary" wrote in message
...
hey peo. that worked.

a little more help. now if I also want to add half day which is mentioned
as H/D..but I dont want to count it as 1, I want to count it as .5

so if there is one CL and one H/D, the total should be 1.5

any idea?

"Peo Sjoblom" wrote in message
...
Try

=SUM(COUNTIF(A2:Z2,{"CL";"PL";"SL";"UL"}))



--
Regards,

Peo Sjoblom



"Gary" wrote in message
...
Hi All,

I have to count Casual Leaves, Sick Leaves, Privilege Leaves and
Unscheduled Leaves for an employee. In the attendance sheet, they're
marked as CL, SL, PL, UL.

Now how do I get a count of all the leaves with just one formula. Right
now I am using this.
=COUNTIF(A2:Z2,"CL")+COUNTIF(A2:Z2,"SL")+COUNTIF(A 2:Z2,"PL")+COUNTIF(A2:Z2,"UL")

Is there an easier way? like multiple conditions with just one COUNTIF?

Thanks
Gary.







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM
Compound condition with COUNTIF Mike McLellan Excel Discussion (Misc queries) 1 November 29th 05 10:50 AM
countif condition problem Scott Excel Worksheet Functions 8 November 11th 05 08:59 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


All times are GMT +1. The time now is 07:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"