Advertisement

06.02.2008 at 11:12PM PDT, ID: 23452180
[x]
Attachment Details

Find closest number in a list

Asked by Janrow in ColdFusion Application Server, Cold Fusion Markup Language

<cfset MYLIST = 9,18,35,50,75,100>

A changing sales total is passed via FORM.TOTALCOST. The total can be any value, such as $10.47, etc. Again, TOTALCOST changes for each user so its value can be anything.

How can I find which number in TOTALCOST is closest to but not surpassing MYLIST?

I assume using CFLOOP is needed to compare the list but I need to see how this works in a working cfm code example using my values. Need this ASAP.Start Free Trial
[+][-]06.02.2008 at 11:57PM PDT, ID: 21698113

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:10PM PDT, ID: 21703521

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:47PM PDT, ID: 21703869

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 01:17PM PDT, ID: 21704114

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 01:18PM PDT, ID: 21704132

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, Cold Fusion Markup Language
Sign Up Now!
Solution Provided By: gdemaria
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.03.2008 at 01:46PM PDT, ID: 21704374

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 06:42PM PDT, ID: 21706056

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.04.2008 at 06:21AM PDT, ID: 21709752

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628