aj9409
Jan 25, 3:11 pm show options

Newsgroups: microsoft.public.fr.excel
From: "aj9409" <[email protected]> - Find messages by this author
Date: 25 Jan 2006 12:11:48 -0800
Local: Wed, Jan 25 2006 3:11 pm
Subject: help in writing an excel program
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

I column A have a list of values. In column B, I have a cost, and in
column c I have the incrimental cost between lets say A6 and A7. What
I want to do is write a program that allows me to put in a value in a
cell lets say D1 is 137. I want to compare my D1 value to A3, A4 , A5
and so on until it does not exceed a value in the A column. When the D1

value is between, lets say A7 and A8, I want to use the value in B7,
and then multiply (D1 - A7) by C7 and get a resulting value in D2.


In short if D1 is greater than A3, then compare it to the next
successive A cell until it is not greater, when it is not greater, then

minus the A cell from D1 and multiply it by the corresponding C cell,
and at the corresponding B cell value.