Hi and welcome to OzGrid.
It's possible that more than 1 person in Column A has the maximum amount in Column B. Do you want all persons or any person?
hi, i'm new to this and need your help.
i have a simple excel sheet where col A values are names,
and col B values are the amount in dollars.
how can i search for the max value in column B and show who that is from col A.
Welcome to Ozgrid. Please can you make your question titles relevant to your problem
excel help search is not very helpful, so I have edited it.
This helps people to help you and others find solutions to their problems.
If you were just searching for the maximum in column B the formula would be:and if you wanted to know how many persons in column A had the maximum in column B:VB:=MAX(B2:B7)I've used a Pivot Table to look at columns A and B and show me the persons with the maximum. When you've added more data or edited the data in columns A and B, right-click on any cell in the Pivot Table and click Refresh Data to update the Pivot Table.VB:=COUNTIF(B2:B7,MAX(B2:B7))
You see as you hang out here that there are often more than 1 way to do something.
Using VBA, you could have a worksheet change event macro that could run certain code whenever a cell in column A or B changed.
This could be used to update the pivot table everytime a cell in either column A or B changed.
Alternatively, the code could list the persons in column D whose amount in column B is equal to the maximum in column B.
thanks it's a great help.
what i need is to get the name of the person with max value,and
then display the name in the worksheet, so that say in
col C i have the name and col D the amount of the revenue.
chances are there will be no 2 dollar amounts equal.
Let's assume your names are in A2:A5, with the values in B2:B5
To get the max name - this will work for ONE maximum value
For multiple instances, the first name will be returned, but you could use barb's contif founction to provide a warning for when this happens.
If the dollar amounts are all different doesn't Barbara's Pivottable do that?
There are currently 1 users browsing this thread. (0 members and 1 guests)