Find averages for # of events (Column B) & related averages for days 1-7 in Column C

thankyou

Board Regular
Joined
Aug 13, 2008
Messages
189
Hi, hope you're doing great today.

In column B, I have # of events, like this:

2
1
1
2
1
4

<tbody>
</tbody>


In column C, I have Day number of week, eg:
1 (Sun)
2
3
4 (Wed)
5
6
7 (Sat)

<tbody>
</tbody>


In column D (if you want to use this instead of day number), I have the actual weekday name (eg TUE, etc).

Here's where I need your help, please:

I want to make a table (results in H2 thru N5), like this:

MONTUEWEDTHFRSAT
SUN
AVERAGE # of events
MODE1(most frequent event #)
MODE2 (2nd most frequent event #)
MEDIAN

<tbody>
</tbody>


So, if possible, I'd like the formulas ideally, for my learning stage, that will go into H2 thru M5 for my output table.
Thank you very much for your help and time, which I truly value and appreciate. If can't do formulas I can try arrays, but I always forget when I go back into edit, and end up hitting Enter instead of CSE.
(oh, by "mode2", i mean 2nd most frequent occurrence from column B which is the data I'm hoping to analyze).

thank you
so much!
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi again!

Just one question: Excel can recognise the text strings "Thu" and "Fri" as referring to those days, though not (without prior manipulation) "Th" and "Fr".

You've used recognisable 3-letter abbreviations for all the other days of the week - could you do so also for these two, which would make solutions a bit more consistent? Or must those two stay as 2-letter abbreviations?

Cheers
 
Upvote 0
How are your days of the week stored in column D?

Are they simply text entries, or perhaps generated by some formula and in cells formatted as e.g. "ddd"?

Regards
 
Upvote 0
Column D weekday numbers are generated indeed from a formula of values in column A like this:

Column A ... Column D

2/10/14 MONDAY

"MONDAY" is generated from column A using "=WEEKDAY(A2)".

Thanks for your post.

Have an awesome day.
 
Upvote 0
I don't know of any easy way to get your mode2, but maybe this will help you get started with the other parts of your table.
Just copy the formulas in column I of the example across. Be careful how you lock the cell references. Notice that in the COLUMNS $I$1:I1 that the first cell is lock and the other is not. This will give you an expand range as you copy across, so one cell to the right would become COLUMNS $I$1:J1. This is just a counter that will match up to the Day of the Week # in your column C.

The formulas for the MODE and MEDIAN are array formulas and must be entered with
Excel Workbook
ABCDHIJKLMNO
1EventsDay of WeekSUNMONTUEWEDTHFRSAT
221AVERAGE # of events2.7113.512.50
312MODE1(most frequent event #)211None1NoneNone
413MODE2 (2nd most frequent event #)
524MEDIAN2113.512.50
615
746
807
921
1012
1113
1254
1315
1416
1541
CTRL-SHIFT-ENTER.
 
Upvote 0
AhoyNC,

Excellent. Let me get to work on that. I'll get back to you shortly.

Thanks and kind regards,

Bob
 
Upvote 0
AhoyNC,

Simply put, it's PERFECT.

Thank you so much for your awesome help. I'm learning a lot.

I'm working on the mode2 and I should be able to do that part myself from piecing together other code.

Keep up the great work and thanks again.
 
Upvote 0
You're welcome. Glad it worked for you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top