Comments on: Compare and output greater value.
http://ask.metafilter.com/113437/Compare-and-output-greater-value/
Comments on Ask MetaFilter post Compare and output greater value.Thu, 05 Feb 2009 04:59:12 -0800Thu, 05 Feb 2009 04:59:12 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: Compare and output greater value.
http://ask.metafilter.com/113437/Compare-and-output-greater-value
Spreadsheet question: Display Greater Value? I know this is one of those "you-either-know-it-or-you-don't" situations, and I just don't know. <br /><br /> Hokay, so here's ze situation:<br>
<br>
There are two columns of numbers, A and B<br>
<br>
A1 has a value of 10, and B1 has a value of 15.<br>
<br>
What do I type into C1 to compare A1 and B1, and display the greater value of 15?post:ask.metafilter.com,2009:site.113437Thu, 05 Feb 2009 04:57:05 -0800guptaxpnspreadsheetexcelcalcspreadsheetscomputerscomputerofficemicrosoftofficeresolvedBy: Happy Dave
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629709
MAXA(A1:B1)comment:ask.metafilter.com,2009:site.113437-1629709Thu, 05 Feb 2009 04:59:12 -0800Happy DaveBy: Happy Dave
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629711
That'll work for any range. So, say you have five columns, and you want the sixth column to show the greatest number in those five columns, you'd just make the range A1:E1.comment:ask.metafilter.com,2009:site.113437-1629711Thu, 05 Feb 2009 05:00:25 -0800Happy DaveBy: Happy Dave
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629713
Also, if you're having trouble with figuring out what function to use, in Excel 2003 and later you can click the 'Function' button (to theleft of the display bar), and type in a plain english description of what you're trying to do. So for this, you'd type in 'find the greatest number' and it'd give you back MAXA and other comparison functions.comment:ask.metafilter.com,2009:site.113437-1629713Thu, 05 Feb 2009 05:02:06 -0800Happy DaveBy: Kid Charlemagne
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629757
MAXA, as stated above, is the clean way to do this.<br>
<br>
You can do all sorts of comparisons with If as well, it's not as clean for this but it lets you do other kinds of things besides simple greater or lesser functions:<br>
<br>
IF(A1>B1, A1, B1)<br>
<br>
Throw in some booleans, some text functions and maybe some conditional formatting and you can go insane!<br>
<br>
IF(A1>B1,"Win!",IF(A1=B1,"Meh.","FAIL!"))comment:ask.metafilter.com,2009:site.113437-1629757Thu, 05 Feb 2009 06:12:45 -0800Kid CharlemagneBy: TypographicalError
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629808
<a href="http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629757">Kid Charlemagne</a>: "<i>MAXA, as stated above, is the clean way to do this.<br>
<br>
You can do all sorts of comparisons with If as well, it's not as clean for this but it lets you do other kinds of things besides simple greater or lesser functions:<br>
<br>
IF(A1>B1, A1, B1)<br>
<br>
Throw in some booleans, some text functions and maybe some conditional formatting and you can go insane!<br>
<br>
IF(A1>B1,"Win!",IF(A1=B1,"Meh.","FAIL!"))</i>"<br>
<br>
Of course, you need semicolons everywhere you have commas.comment:ask.metafilter.com,2009:site.113437-1629808Thu, 05 Feb 2009 06:59:59 -0800TypographicalErrorBy: losvedir
http://ask.metafilter.com/113437/Compare-and-output-greater-value#1629829
<i>Of course, you need semicolons everywhere you have commas.</i><br>
<br>
Is guptaxpn asking about Excel here? In Excel, the commas work just fine and semicolons don't work. Of course, he'd need an "=" sign in front.comment:ask.metafilter.com,2009:site.113437-1629829Thu, 05 Feb 2009 07:31:57 -0800losvedir