Hi,
You may try this. Let's say the data is in range C3

11 (row 3 has the
headings). Select C3

11 and assign it a name, say trial. Save the file on
the desktop and click on a blank cell.
1. Go to Data > Get External Data > From other sources > From Microsoft
Query
2. Select Excel files and click on OK
3. Navigate tot eh desktop, select the existing Excel file and click on Next
4. Select trial and click on the greater then symbol
5. Click on Next 3 times and on the last screen, select View data or Edit
query in MS Office Excel
6. Click on SQL, delete whatever you see in the box and type the following
Select avg(Days) from
(
SELECT distinct Inv#, Days
FROM try
)
click on OK and you will see the average
7. Go to file > Return Data to MS Office Excel
8. In the import data box, select table and in the white box, select any
blank cell
Hope this works
--
Regards,
Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
"Nadine" <(E-Mail Removed)> wrote in message
news:55956962-01B6-4DDD-B50B-(E-Mail Removed)...
> I posted this question with the title of Average If which was a misleading
> title.
>
> 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.
>