Finding the MAX value depending on another value using VB!!

stakar

Active Member
Joined
Mar 6, 2004
Messages
333
I have the following sources

A--B
1--00
2--00
4--00
14-00
25-00
50-00
8---10
12--10
19--10
28--10
5---02
45--02
1---28
3---28
8---28
15--28
16--28
--------------------------------------------------
I have the following result
(they are the unique values of previous column B)

C
00
02
28
10
--------------------------------------------------------
I want a D column with the max values next to each value on column C. The source will be the column A from the previous table

** I want to use vb code because is a part of a routine and i dont want cell formula to get the following result

C----D
00-- 50
02-- 45
28-- 16
10-- 28

Thanks in advance
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

stakar

Active Member
Joined
Mar 6, 2004
Messages
333
My mistake

bat17 said:
is this in Access or Excel?

Peter

Peter, Yes its in excel
My mistake this topic being here.
I have already created a new thread to the excel question msg board!

So if u have an answer please go to the excel question msg board!

Thanks
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,885
Messages
5,766,936
Members
425,388
Latest member
Cave_Johnson

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
Top