Fill a column with the MODE from another column per unique value of a third column

Nato595

New Member
Joined
Aug 13, 2004
Messages
35
I am looking for a formula that will fill column C with the Mode value from column B, for each unique value in column A.

In my below example, pretend that only columns A and B are filled, I want this formula to fill C with what you see.

john 2 2
john 47 2
john 2 2
john 2 2
john 1 2
john 1 2
sally 15 15
sally 15 15
sally 15 15
sally 7 15
pimpy 12 16
pimpy 16 16
pimpy 16 16
pimpy 16 16
pimpy 12 16
pimpy 4 16


Thanks in advance!!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Excel Workbook
ABC
1john22
2john22
3john22
4john22
5john12
6john12
7sally1515
8sally1515
9sally1515
10sally715
11pimpy1216
12pimpy1616
13pimpy1616
14pimpy1616
15pimpy1216
16pimpy416
Sheet1
 
Upvote 0
You can use this "array formula" in C1

=MODE(IF(A$1:A$16=A1,B$1:B$16))

confirm with CTRL+SHIFT+ENTER and copy down.

Note: that MODE gives #N/A if there are no repeated values (for any name)
 
Upvote 0

Forum statistics

Threads
1,215,476
Messages
6,125,029
Members
449,205
Latest member
Eggy66

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