Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2017, 06:04 PM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default List max values in a range

Hi I need help trying to list the max values in a new column. If my data is as follows:



Column A; Column B; Column C;
1. Adelaide; Sara Poon; 1
2. King; Jason Ex; 2
3. Wellington; John Smith 1
4. Bill; John Smith; 1
5. King; Jason Ex; 3
6. Adelaide; Joe Shoe; 2
7. Adelaide; Joe Shoe; 1
8. King; Jason Ex; 1

I need to results in column D to read the highest value from column C if column A and B match and return a value of 0 for all other columns. For example rows 2, 5, and 8 have the same name in column A and B but I want to capture the highest value from column C which is row 5. The output I am wanting is as follows:

Column A; Column B; Column C; Column D
2. King; Jason Ex; 2; 0
5. King; Jason Ex; 3; 3
8. King; Jason Ex; 1;0
Reply With Quote
  #2  
Old 04-20-2017, 04:40 AM
NBVC's Avatar
NBVC NBVC is offline List max values in a range Windows 7 64bit List max values in a range Office 2007
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Try this is array formula in D1:

=IF(C1=MAX(IF(($A$1:$A$8=A1)*($B$1:$B$8=B1),$C$1:$ C$8)),C1,0)

confirmed with CTRL+SHIFT+ENTER not just ENTER, then copied down
Reply With Quote
  #3  
Old 04-20-2017, 05:01 AM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default

Thank you this is very helpful, but it is only capturing the max value, which is 3.
A- Location; B- Name; C - number of visits; D - max number of visits
1. Adelaide; Sara Poon; 1;0
2. King; Jason Ex; 2;0
3. Wellington; John Smith; 1 ; 0
4. Bill; John Smith; 1; 0
5. King; Jason Ex; 3; 3
6. Adelaide; Joe Shoe; 2; 0
7. Adelaide; Joe Shoe; 1; 0
8. King; Jason Ex; 1;0

But what I am looking for is to capture is if columns A (location) and B (name) match, then capture the max number of visits D from column C
A- Location; B- Name; C - number of visits; D - max number of visits
1. Adelaide; Sara Poon; 1;1
2. King; Jason Ex; 2;0
3. Wellington; John Smith; 1 ; 1
4. Bill; John Smith; 1; 1
5. King; Jason Ex; 3; 3
6. Adelaide; Joe Shoe; 2; 2
7. Adelaide; Joe Shoe; 1; 0
8. King; Jason Ex; 1;0
Reply With Quote
  #4  
Old 04-20-2017, 05:12 AM
NBVC's Avatar
NBVC NBVC is offline List max values in a range Windows 7 64bit List max values in a range Office 2007
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Hi,

When you enter this formula you need to confirm it with CTRL+SHIFT+ENTER first (you will see { } brackets appear around the formula)... then copy it down. It is a special Array formula
Reply With Quote
  #5  
Old 04-20-2017, 08:28 AM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default

Thank you again!! This is so helpful!! I got it to work and capture max value including and above 2 visits, however if the Value in Column A and B only occur once the max value in column C is 1. I need to be able to capture the "1" in column C if that is the max value. Right now I am getting a 0. Any chance you might know how to solve this?
Reply With Quote
  #6  
Old 04-20-2017, 09:05 AM
NBVC's Avatar
NBVC NBVC is offline List max values in a range Windows 7 64bit List max values in a range Office 2007
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

My formula should capture that.

See attached. Let me know what is wrong with it or amend it to show what you are requiring then re-attach.
Attached Files
File Type: xlsx Book2.xlsx (8.7 KB, 11 views)
Reply With Quote
  #7  
Old 04-20-2017, 09:10 AM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default

The "1" you have in column D are "0" when I run the formula. All other values in column D "2" and "3" are the same as you have.
Reply With Quote
  #8  
Old 04-20-2017, 09:12 AM
NBVC's Avatar
NBVC NBVC is offline List max values in a range Windows 7 64bit List max values in a range Office 2007
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Hmm... are you referencing the correct relative cells?

Can you attach your spreadsheet (if not confidential) otherwise, a sample showing same issue...?
Reply With Quote
  #9  
Old 04-20-2017, 09:28 AM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default

it's confidential and it's a pretty big file to change the content. I did try the formula in a small table of data and it works, but I'm working with close to 100,000 rows of data and for some reason it's not capturing the Max Value "1" in column D.
Reply With Quote
  #10  
Old 04-20-2017, 09:51 AM
Bella06 Bella06 is offline List max values in a range Windows 7 32bit List max values in a range Office 2013
Novice
List max values in a range
 
Join Date: Apr 2017
Posts: 6
Bella06 is on a distinguished road
Default

We figured it out!! Your formula is correct and thank you soooo much for all your help. The issue we had was not in the formula but in some of our data. The 0 in column D we are now capturing as 1. Thank you again!!!
Reply With Quote
  #11  
Old 04-20-2017, 10:05 AM
NBVC's Avatar
NBVC NBVC is offline List max values in a range Windows 7 64bit List max values in a range Office 2007
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Great! You are welcome.
Reply With Quote
Reply

Tags
countifs, match/index, max



Similar Threads
Thread Thread Starter Forum Replies Last Post
List max values in a range Using IF Function where logical test is for range of values guciolino Excel 10 02-13-2017 08:05 AM
List max values in a range select a cluster of point from a range based on x and y values sandcharles Excel 5 02-19-2015 06:15 AM
List Boxes with Values winter4400 Word 5 02-19-2013 03:14 PM
List max values in a range load list box from range in excel Joe Patrick Word VBA 8 06-07-2011 09:31 AM
List max values in a range comparing values from a range struct Excel 1 04-01-2011 07:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft