#1
|
|||
|
|||
Combined MAX and IF statements?
I am using Excel 2013.
I have two sheets, 1st with the raw data, 2nd for a summary page. Raw Data Page: Column A List of locations Column B Numbers In Row 1 column B I have a MAX statement which gives me my MAX number. Summary Page: I want to be able to list the location that has the MAX number with the number next to it. Any help would be greatly appreciated. -Dale |
#2
|
|||
|
|||
I admit I started thinking about the problem just as you phrased it, 'how do I get the corresponding location value to my maximum number value'; however, this is best managed by a pivot table.
1. (optional) select data on sheet 1 and turn it into a table 2. create a pivot table 3. organize with list of locations in the 'rows' and numbers in the 'values'; ensure that values are set to show maximum (as opposed to sum etc). 4. right click on one of your maximum values shown for a given location and select 'organize by' and choose 'highest to lowest'. Your highest value is now at the top, and immediately left of it is the corresponding location. hope that helps - the vlookup would not have been transparent to you about duplicates, this way you know if there is a tie for the winner. ian. |
#3
|
||||
|
||||
Posting a small sample sheet of your data would help
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#4
|
|||
|
|||
Example
Here is a small example, not the real data. There are over 400 rows of data in the real one.
|
#5
|
||||
|
||||
The location for the highest nr of " beds" can be obtained by =INDEX('RAW DATA'!$A$6:$A$12;MATCH(MAX('RAW DATA'!B$6:B$12);'RAW DATA'!B$6:B$12;0))
pull right for other values For the lowest, the same, using MIN instead of MAX This will work as long as the three columns stay in the same order on both pages. If not, some tweaking is necessary but easy to do. OTH what should happen if there is more than one MAX or MIN?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#6
|
|||
|
|||
I'm not sure what you mean when you asked: "what should happen if there is more than one MAX or MIN?" Do you mean if there are two values that are the same?
|
#7
|
|||
|
|||
This formula works, but the ";" needs to be replaced with ","
Thank you for your help. |
#8
|
||||
|
||||
Oops, my mistake
And yes, what happens when you have a tie ( is that the correct word?)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#9
|
|||
|
|||
With what I am doing the chances of that ever happening is slim to none (not saying that it would never happen), not sure what I will do at that point.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odd Result In Combined Merged Time Fields | JennEx | Mail Merge | 9 | 04-29-2017 08:58 AM |
Why are my Macros combined into a single module? | Cyberseeker | Excel Programming | 1 | 04-02-2017 02:43 AM |
Can Text Label & PAGE Field be combined? | binar | Word | 1 | 02-11-2013 03:07 AM |
combined in-box for webmail accounts | sonoman | Outlook | 1 | 07-19-2011 02:50 PM |
word and excel combined | jasperman | Word | 1 | 08-23-2010 06:49 AM |