View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sexy Devil[_2_] Sexy Devil[_2_] is offline
external usenet poster
 
Posts: 5
Default Difficult formula required.

Hi Ron, thanks for explaining so far.

cell E and D would be typed in numbers (hours) 1 or 1.25....

the result would be the total cost in the last cell (H) of each row.

"Ron Rosenfeld" wrote:

On Thu, 26 Nov 2009 08:11:01 -0800, Sexy Devil
wrote:

I have been told by my excel guru that I cant have the following info in one
formula. Using Excel 2003
Is this true people? Many thanks for thinking about it. X
What I am after is;

If cell A is "X or Y or Z" & cell B is Mon, Tues, Wed, Thurs or Fri then
multiply cell E by £15.00 but
If cell A is "X or Y or Z" & cell B is "Sat" then multiply cell E by £20.00
but
If cell A is "X or Y or Z" & cell B is "Sun" then multiply cell E by £25.00
but
If cell A is "V" & cell B is "Mon, Tues, Wed, Thurs or Fri" & cell C between
00:01 & 08:00 (time) then multiply cell E by £10.00 & cell D by £5 but
If cell A is "V" & cell B is "Mon, Tues, Wed, Thurs or Fri" & cell C between
08:01 & 18:00 (time) then multiply cell E by £12.00 but
If cell A is "V" & cell B is "Mon, Tues, Wed, Thurs or Fri" & cell C between
18:01 & 23:59 (time) then multiply cell E by £10.00 & cell D by £5.


It may not be possible because you have not clearly stated your requirements.

When you write "multiply cell E by ..." do you want that done within cell E, or
are you merely looking for the results of that computation?

When you write "multiply cell E by £10.00 & cell D by £5" what, exactly do you
mean. Do you want this done within the respective cells, or do you want the
sum of these two computations, or do you want the product of these two
computations, or do you want something else.

If you want to do this with a formula in cell E and cell D, then it is not
possible. If you are looking for the results of the computations, then it is
possible, depending on what you mean when you are referring to both cells E and
D.

An example of the first three "IF's" might be:

=E2*
(AND(OR(A2={"X","Y","Z"}),OR(B2={"Mon","Tues","Wed ","Thurs","Fri"}))*15+
AND(OR(A2={"X","Y","Z"}),B2="Sat")*20+
AND(OR(A2={"X","Y","Z"}),B2="Sun")*25)

You can certainly extend this concept to encompass the other conditions,
assuming you can answer the above questions.
--ron
.