I need to calculate the average days before departure my travellers are booking. Also need the mean number of days before departure they book. Attached is sample data.
How do I calculate this for Flight 1 and Flight 2?
thanks
I need to calculate the average days before departure my travellers are booking. Also need the mean number of days before departure they book. Attached is sample data.
How do I calculate this for Flight 1 and Flight 2?
thanks
Average and Mean are effectively the same, so I'm guessing you want one of the averages to be weighted.
A smaller sample, with the expected results manually calculated would provide us with a better chance of understanding what you need.
See if this gets you on the right track.
=SUMPRODUCT(A2:A102,B2:B102)/SUM(B2:B102)
Last edited by jason.b75; 08-17-2016 at 08:48 AM.
Hi
the sumproduct worked fine. thank you.
I also see that I asked for the wrong value with the second question.
I meant the booking made in the middle (as many bookings made before as after). Median not mean
how do I calculate the median?
thanks for all help
Try
=LOOKUP(SUM($B$2:$B$102)/2,SUBTOTAL(9,OFFSET($B$2,0,0,ROW($B$2:$B$102)-ROW($B$2)+1,1)),$A$2:$A$102)
This returns whole days rounded down, if you want decimal accuracy with this then it will get a bit more complicated.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks