Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a column of invoice numbers and multiple rows of data pertaining to
each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this array formula** :
=AVERAGE(IF(FREQUENCY(A2:A9,A2:A9),B2:B9)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... I have a column of invoice numbers and multiple rows of data pertaining to each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Didn't work. :( Result was #N/A as an array formula. Thanks for trying.
"T. Valko" wrote: Try this array formula** : =AVERAGE(IF(FREQUENCY(A2:A9,A2:A9),B2:B9)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... I have a column of invoice numbers and multiple rows of data pertaining to each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. . |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here's a small sample file using your posted data that demonstrates this.
zNadine.xls 14kb http://cjoint.com/?eCdSeTo64Y As you'll see the formula (which doesn't have to be array entered) returns the correct result. If you're getting an error I suspect that your invoice #s aren't really numbers like your sample data, or they may look like numbers but they're really TEXT numbers. TEXT numbers and NUMERIC numbers are not the same. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... Didn't work. :( Result was #N/A as an array formula. Thanks for trying. "T. Valko" wrote: Try this array formula** : =AVERAGE(IF(FREQUENCY(A2:A9,A2:A9),B2:B9)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... I have a column of invoice numbers and multiple rows of data pertaining to each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. . |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You are correct. I should have thought of that. They are alpha numeric
sometimes with a dash. "T. Valko" wrote: Here's a small sample file using your posted data that demonstrates this. zNadine.xls 14kb http://cjoint.com/?eCdSeTo64Y As you'll see the formula (which doesn't have to be array entered) returns the correct result. If you're getting an error I suspect that your invoice #s aren't really numbers like your sample data, or they may look like numbers but they're really TEXT numbers. TEXT numbers and NUMERIC numbers are not the same. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... Didn't work. :( Result was #N/A as an array formula. Thanks for trying. "T. Valko" wrote: Try this array formula** : =AVERAGE(IF(FREQUENCY(A2:A9,A2:A9),B2:B9)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... I have a column of invoice numbers and multiple rows of data pertaining to each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. . . |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ok, for alphnumerics try this array formula** :
=AVERAGE(IF(FREQUENCY(MATCH(A2:A10,A2:A10,0),ROW(A 2:A10)-ROW(A2)+1),B2:B10)) Assumes no empty cells in either range. Empty cells in the Invoice # range will cause #N/A errors. Empty cells in the amount range could cause an incorrect result depending on where the empty cells are located. ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... You are correct. I should have thought of that. They are alpha numeric sometimes with a dash. "T. Valko" wrote: Here's a small sample file using your posted data that demonstrates this. zNadine.xls 14kb http://cjoint.com/?eCdSeTo64Y As you'll see the formula (which doesn't have to be array entered) returns the correct result. If you're getting an error I suspect that your invoice #s aren't really numbers like your sample data, or they may look like numbers but they're really TEXT numbers. TEXT numbers and NUMERIC numbers are not the same. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... Didn't work. :( Result was #N/A as an array formula. Thanks for trying. "T. Valko" wrote: Try this array formula** : =AVERAGE(IF(FREQUENCY(A2:A9,A2:A9),B2:B9)) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Nadine" wrote in message ... I have a column of invoice numbers and multiple rows of data pertaining to each one. So one invoice number could have 10 rows of data pertaining to it so the invoice number will be repeated 10 times. Then on each line is the time it took to receive the data so this number will be the same on all 10 lines. I have hundreds of rows of data but only a handful of invoice numbers. I need to find the average of the days based on the unique count of the invoice numbers. I already have my formula for the unique count but now need one for the average when the invoice numbers are not in contiguous cells down the column. Example: Col A Col B Invoice # # Days 12345 11 12345 11 12345 11 98995 15 66438 37 12345 11 98995 15 12345 11 So there are 3 unique invoice numbers. How do I write the formula to find the average number days it took to receive all three? I'm in Excel 2003. . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A formula to AVERAGE IF but only average a set number of values | Excel Worksheet Functions | |||
Find monthly average but have average automatically configured | Excel Discussion (Misc queries) | |||
Error Handling #N/A with AVERAGE Function - Average of values in Row | Excel Worksheet Functions | |||
Weighed Average of a weiged average when there are blanks | Excel Discussion (Misc queries) | |||
how does one convert text to a formula "average(A:A)" to =average( | Excel Worksheet Functions |