ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Formula? (https://www.excelbanter.com/excel-discussion-misc-queries/211177-if-formula.html)

Nanapat

If Formula?
 
I need to arrive at the total percentage of time entered in all of Column B
(based on 24 hours) ONLY IF column A has the letter "C" in it. I'm having
trouble with my formula. Can someone help please? Example:

A B

C 2:30
L 3:40
W 1:00
C 1:00





Max

If Formula?
 
Assuming real times in col B
In say, C1: =SUMIF(A:A,"C",B:B)
Just format C1 as percentage to taste
C1 will return the required percentage over 24 hours
(24 hours is equivalent to an underlying value of 1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"Nanapat" wrote:
I need to arrive at the total percentage of time entered in all of Column B
(based on 24 hours) ONLY IF column A has the letter "C" in it. I'm having
trouble with my formula. Can someone help please? Example:

A B

C 2:30
L 3:40
W 1:00
C 1:00



T. Valko

If Formula?
 
Try this:

=SUMIF(A1:A4,"C",B1:B4)*24/24

Format as Percentage

--
Biff
Microsoft Excel MVP


"Nanapat" wrote in message
...
I need to arrive at the total percentage of time entered in all of Column B
(based on 24 hours) ONLY IF column A has the letter "C" in it. I'm having
trouble with my formula. Can someone help please? Example:

A B

C 2:30
L 3:40
W 1:00
C 1:00







Nanapat

If Formula?
 
Thanks very much to T. Valko and Max for taking the time to help me out. One
more question, please. I want to calculate the percentage of the "C"s in
column A, compared to ALL of column A. Can you help me once more?

"T. Valko" wrote:

Try this:

=SUMIF(A1:A4,"C",B1:B4)*24/24

Format as Percentage

--
Biff
Microsoft Excel MVP


"Nanapat" wrote in message
...
I need to arrive at the total percentage of time entered in all of Column B
(based on 24 hours) ONLY IF column A has the letter "C" in it. I'm having
trouble with my formula. Can someone help please? Example:

A B

C 2:30
L 3:40
W 1:00
C 1:00








Max

If Formula?
 
Thanks very much to T. Valko and Max for taking the time to help me out.

Welcome. Please go back and press the Yes* buttons in all responses which help
*like the ones below, from where you're reading this

I want to calculate the percentage of the "C"s in
column A, compared to ALL of column A


Assuming no column header in A1, then:
=COUNTIF(A:A,"C")/COUNTA(A:A)
Format as percentage

If there is a column header in A1, adjust it like this:
=COUNTIF(A:A,"C")/(COUNTA(A:A)-1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---



All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com