Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi, I am struggling getting a formula to work and even quesitoning if I am even using the right formula. I want a total count my values (just number of) in column B based on IF column A has a specific value ("L" or "D") This formula almost works but only requires one "L" value to be present in column A and I want it to look at each line through A2:A10 =COUNTA(IF(A2:A10="L",B2:B10)) Thanks! -Wesley -- wester69 ------------------------------------------------------------------------ wester69's Profile: http://www.officehelp.in/member.php?userid=4689 View this thread: http://www.officehelp.in/showthread.php?t=1278723 Posted from - http://www.officehelp.in |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=SUMPRODUCT(--(ISNUMBER(MATCH(A2:A10,{"L","D"},0))),--(B2:B10<"")) Biff "wester69" wrote in message ... Hi, I am struggling getting a formula to work and even quesitoning if I am even using the right formula. I want a total count my values (just number of) in column B based on IF column A has a specific value ("L" or "D") This formula almost works but only requires one "L" value to be present in column A and I want it to look at each line through A2:A10 =COUNTA(IF(A2:A10="L",B2:B10)) Thanks! -Wesley -- wester69 ------------------------------------------------------------------------ wester69's Profile: http://www.officehelp.in/member.php?userid=4689 View this thread: http://www.officehelp.in/showthread.php?t=1278723 Posted from - http://www.officehelp.in |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I may not understand you correctly, but this will sum your values in column
B where Column A contains "L" or "D". =SUMIF(A2:A10,"L",B2:B9)+SUMIF(A2:A10,"D",B2:B9) HTH, Paul "wester69" wrote in message ... Hi, I am struggling getting a formula to work and even quesitoning if I am even using the right formula. I want a total count my values (just number of) in column B based on IF column A has a specific value ("L" or "D") This formula almost works but only requires one "L" value to be present in column A and I want it to look at each line through A2:A10 =COUNTA(IF(A2:A10="L",B2:B10)) Thanks! -Wesley -- wester69 ------------------------------------------------------------------------ wester69's Profile: http://www.officehelp.in/member.php?userid=4689 View this thread: http://www.officehelp.in/showthread.php?t=1278723 Posted from - http://www.officehelp.in |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try something like this:
With A2:A10 containing any value or no value B2:B10 containing any value or no value This formula returns the count of the Col_B values (ignoring blanks) where the corresponding Col_A value is either L or D: C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*(B2:B10<" ")) This one only counts numeric values: C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*ISNUMBER(B 2:B10)) Does that help? *********** Regards, Ron XL2002, WinXP "wester69" wrote: Hi, I am struggling getting a formula to work and even quesitoning if I am even using the right formula. I want a total count my values (just number of) in column B based on IF column A has a specific value ("L" or "D") This formula almost works but only requires one "L" value to be present in column A and I want it to look at each line through A2:A10 =COUNTA(IF(A2:A10="L",B2:B10)) Thanks! -Wesley -- wester69 ------------------------------------------------------------------------ wester69's Profile: http://www.officehelp.in/member.php?userid=4689 View this thread: http://www.officehelp.in/showthread.php?t=1278723 Posted from - http://www.officehelp.in |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Shorter versions of my posted formulas:
Count any values C1: =SUMPRODUCT((A2:A10={"L","D"})*(B2:B10<"")) Count numeric values C1: =SUMPRODUCT((A2:A10={"L","D"})*ISNUMBER(B2:B10)) *********** Regards, Ron XL2002, WinXP "Ron Coderre" wrote: Try something like this: With A2:A10 containing any value or no value B2:B10 containing any value or no value This formula returns the count of the Col_B values (ignoring blanks) where the corresponding Col_A value is either L or D: C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*(B2:B10<" ")) This one only counts numeric values: C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*ISNUMBER(B 2:B10)) Does that help? *********** Regards, Ron XL2002, WinXP "wester69" wrote: Hi, I am struggling getting a formula to work and even quesitoning if I am even using the right formula. I want a total count my values (just number of) in column B based on IF column A has a specific value ("L" or "D") This formula almost works but only requires one "L" value to be present in column A and I want it to look at each line through A2:A10 =COUNTA(IF(A2:A10="L",B2:B10)) Thanks! -Wesley -- wester69 ------------------------------------------------------------------------ wester69's Profile: http://www.officehelp.in/member.php?userid=4689 View this thread: http://www.officehelp.in/showthread.php?t=1278723 Posted from - http://www.officehelp.in |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Ron, your solution was the ticket . Thank you also to the others for
helping. I was on a wrong path! This is what I needed =SUMPRODUCT((A2:A10="L")*(B2:B10<"")). The other solutions were adding only the numbered cells in my B column, were I needed to just count them if they contained text, a number or cobination of text and numbers. Thanks Again! -Wesley |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting multiple values within single cells | Excel Worksheet Functions | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Counting Values on a condition | Excel Worksheet Functions | |||
If Then, not using values, or not counting blanks | Excel Worksheet Functions | |||
Counting Values | Excel Discussion (Misc queries) |