Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to divide a number by counta for certain cells (which would yield a
number). For example, =10/counta(A1:A4) would equal 10/4 if cells A1 to A4 are filled. What I am stuck on is this: =10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Example: =10/counta(A1:A4) would be 10/4 but since A2 = B7, the formula gives me 10/3 because A2 is excluded from counta |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What should happen if all the numbers match?
Try something like this: =10/SUMPRODUCT(--(ISNA(MATCH(A1:A4,B5:B8,0))),A1:A4) -- Biff Microsoft Excel MVP "excelguy" wrote in message ... I want to divide a number by counta for certain cells (which would yield a number). For example, =10/counta(A1:A4) would equal 10/4 if cells A1 to A4 are filled. What I am stuck on is this: =10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Example: =10/counta(A1:A4) would be 10/4 but since A2 = B7, the formula gives me 10/3 because A2 is excluded from counta |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ooops!
You wanted to divide by the count not the sum. Try this: =10/SUMPRODUCT(--(ISNA(MATCH(A1:A4,B5:B8,0)))) -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... What should happen if all the numbers match? Try something like this: =10/SUMPRODUCT(--(ISNA(MATCH(A1:A4,B5:B8,0))),A1:A4) -- Biff Microsoft Excel MVP "excelguy" wrote in message ... I want to divide a number by counta for certain cells (which would yield a number). For example, =10/counta(A1:A4) would equal 10/4 if cells A1 to A4 are filled. What I am stuck on is this: =10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Example: =10/counta(A1:A4) would be 10/4 but since A2 = B7, the formula gives me 10/3 because A2 is excluded from counta |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
if all the numbers match it would be:
=10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Excel would give me 10/0? o good point. To fix this I would always make the exclusion range smaller than the regular range "T. Valko" wrote: What should happen if all the numbers match? Try something like this: =10/SUMPRODUCT(--(ISNA(MATCH(A1:A4,B5:B8,0))),A1:A4) -- Biff Microsoft Excel MVP "excelguy" wrote in message ... I want to divide a number by counta for certain cells (which would yield a number). For example, =10/counta(A1:A4) would equal 10/4 if cells A1 to A4 are filled. What I am stuck on is this: =10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Example: =10/counta(A1:A4) would be 10/4 but since A2 = B7, the formula gives me 10/3 because A2 is excluded from counta . |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is an array formula, confirm it by pressing CTRL-SHIFT-ENTER:
=10/COUNTIF(A1:A4,"<"&B5:B8) Does that help? -- "Actually, I *am* a rocket scientist." -- JB (www.MadRocketScientist.com) Your feedback is appreciated, click YES if this post helped you. "excelguy" wrote: I want to divide a number by counta for certain cells (which would yield a number). For example, =10/counta(A1:A4) would equal 10/4 if cells A1 to A4 are filled. What I am stuck on is this: =10/counta(A1:A4 but exclude the cells from this range that equal any of the numbers in in the range B5:B8) Example: =10/counta(A1:A4) would be 10/4 but since A2 = B7, the formula gives me 10/3 because A2 is excluded from counta |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for Counta | Excel Worksheet Functions | |||
Counta formula | Excel Discussion (Misc queries) | |||
COUNTA for a cell with a formula | Excel Worksheet Functions | |||
COUNTA Formula not working | New Users to Excel | |||
COUNTA Function not working =COUNTA(C3:C69,"NH") | Excel Worksheet Functions |