For flexibility, how about this: ListFirst(ListSort(numbers,'numeric')) -Calvin
-----Original Message----- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 9:10 AM To: CF-Talk Subject: RE: Max value of 3 variables Max() should do it if you're not going to eventually have more values. Think it can only take 2 values so nest them like max(max(no1, no2), no3) If its going to be more... just loop them, if the currnent value is larger than the previous, set it to the max... <cfset max = 0 > <cfloop list="#numbers#" index="i"> <cfif i gt max> <cfset max = i> </cfif> </cfloop> -----Original Message----- From: G [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 8:58 AM To: CF-Talk Subject: Max value of 3 variables Got three variables passed into me, all are decimal values. What is the quickest and most elegant way of determining which of the variables holds the largest value? TIA, BG ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203032 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

