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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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