![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 41
|
http://www.blackiechan.net/help.jpg
I need a formula that will return the "Avg Time Late" for whatever is in "A2" just like a vlookup, however i need it to average the data that it gathers from multiple tabs within the workbook. [ This Message was edited by: davin on 2002-05-14 15:29 ] [ This Message was edited by: davin on 2002-05-14 15:30 ] [ This Message was edited by: davin on 2002-05-14 15:31 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
From the jpg that you referenced to, the following data resides in B2:C8 0:08 1:10 0:06 1:00 0:09 1:07 0:01 0:10 0:03 0:25 0:02 0:19 0:57 8:37 The first part of your question is quite clear in that if I put a value of 0:09 in cell A2, I can use the VLOOKUP function as ... =VLOOKUP(A2,B2:C8,1,0) to pick up 0:09 in column B, and =VLOOKUP(A2,B2:C8,2,0) to pick up 1:07 from column C Beyond that, I am not clear about what you are intending to do. A clear explanation of what you are trying to accomplish, perhaps with some sample data would definitely help. Regards! |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 41
|
Yogi,
Assume that all the cells are empty. If I insert J. DOE into A2, I need it to vlookup J. DOE's time late on 31 worksheets (days of the month), then give me the average. I would put this formula in B2. I hope this helps Thanks! Davin [ This Message was edited by: davin on 2002-05-14 16:00 ] |
|
|
|
|
|
#4 | ||
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
||
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Posts: 41
|
correct, the data to be averaged will be on the 31 worksheets.
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
In D2 you'll have: =VLOOKUP(A2,Sheet1!Range1,2,0) so on up to AH2. In C2 you'll have: =SUMIF(D2:AH2,"<>#N/A") In B2 you'll have: =C2/MAX(1,COUNTIF(D2:AH2,"<>#N/A")-COUNTIF(D2:AH2,0)) |
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 41
|
I thought about that, but I was wondering if there was a shorter way.
Thanks! DB |
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Don't bother about eliminating #N/A's. The formulas for C2 and D2 do simply allow for #N/A's. You can hide those 31 columns of course. Aladin [ This Message was edited by: Aladin Akyurek on 2002-05-14 16:42 ] |
|
|
|
|
|
|
#9 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
However, if you did have John Doe's name in the same cell on the related worksheets when John Doe is late, then it will be a simple matter of picking up the sum of the same cell entries across 31 worksheets. Regards! |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|