Request Help with formula

D

Django

Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99 display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django
 
S

Steve Kearon

try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost]<50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same value as Cost

hope this helps
Steve
 
D

Django

Thanks Steve, I tried it and got a circular reference
error. How do I correct that? Appreciate your support.

Django
-----Original Message-----
try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost] <50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same value as Cost

hope this helps
Steve

Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99 display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django


.
 
J

JackD

It works for me except in the case that cost is greater than 50 in which
case it will cause an error.
You are using it in one of the custom cost fields (Cost1...Cost10) right?
-Jack

Django said:
Thanks Steve, I tried it and got a circular reference
error. How do I correct that? Appreciate your support.

Django
-----Original Message-----
try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost] <50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same value as Cost

hope this helps
Steve

Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99 display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django


.
 
D

Django

Yes, I am using Cost1.
-----Original Message-----
It works for me except in the case that cost is greater than 50 in which
case it will cause an error.
You are using it in one of the custom cost fields (Cost1...Cost10) right?
-Jack

Thanks Steve, I tried it and got a circular reference
error. How do I correct that? Appreciate your support.

Django
-----Original Message-----
try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost] <50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same
value
as Cost
hope this helps
Steve

"Django" <[email protected]> wrote
in
message
Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99 display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django



.


.
 
J

JackD

Are any of your costs higher than 50? That will give you an error (should
show up as #ERROR)
However there should be no circular reference error due to this formula.
Sounds like you may have a problem with your project file. Try the formula
in a new file and see if it gives you the same problem.

-Jack


Django said:
Yes, I am using Cost1.
-----Original Message-----
It works for me except in the case that cost is greater than 50 in which
case it will cause an error.
You are using it in one of the custom cost fields (Cost1...Cost10) right?
-Jack

Thanks Steve, I tried it and got a circular reference
error. How do I correct that? Appreciate your support.

Django
-----Original Message-----
try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost]
<50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same value
as Cost

hope this helps
Steve

message
Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99
display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django



.


.
 
S

Steve Kearon

I can reproduce the "circular reference" error if the formula references the
same custom field that it is applied to (for example, you say the Cost1
formula depends on the value of Cost1).

copy the following UNCHANGED as the formula behind Cost1:

Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost]<50,1.1,[Cost]>=50,[Co
st])

(this also fixed the Cost>50 problem)

this says "the value of Cost1 depends on the value in Cost". My guess is you
changed the formula to reference Cost1.

hope this helps
Steve


Django said:
Thanks Steve, I tried it and got a circular reference
error. How do I correct that? Appreciate your support.

Django
-----Original Message-----
try this:
Switch([Cost]<=0,0,[Cost]<10,0.3,[Cost]<25,0.55,[Cost] <50,1.1)

if Cost <= 0 gives 0.00 and Cost >= 50 gives same value as Cost

hope this helps
Steve

Happy Easter everyone. Request help with the following:

I am trying to write a formula that applies to a
customized column. For returns the following results:

If Cost is greater than zero and les than 9.99 display .30
If cost between 10 and 24.99 display .55
If cost between 25 and 49.99 display 1.10

Appreciate any assistance provided.

Django


.
 
J

JackD

Steve Kearon said:
I can reproduce the "circular reference" error if the formula references the
same custom field that it is applied to (for example, you say the Cost1
formula depends on the value of Cost1).

copy the following UNCHANGED as the formula behind Cost1:
Switch( said:
st])

(this also fixed the Cost>50 problem)

this says "the value of Cost1 depends on the value in Cost". My guess is you
changed the formula to reference Cost1.

hope this helps
Steve

But you can't change the value of Cost to depend on Cost1. As written the
formula by itself could not cause a circular reference.

-Jack
 
S

Steve Kearon

I agree. I was just guessing how he managed to get the circular reference
error. My guess was that he copied the formula into the Cost1 custom field
definition, but then edited it, changing one or more references to "Cost" to
be "Cost1". Doing that causes a circular reference error.

Steve

JackD said:
Steve Kearon said:
I can reproduce the "circular reference" error if the formula references the
same custom field that it is applied to (for example, you say the Cost1
formula depends on the value of Cost1).

copy the following UNCHANGED as the formula behind Cost1:
Switch( said:
st])

(this also fixed the Cost>50 problem)

this says "the value of Cost1 depends on the value in Cost". My guess is you
changed the formula to reference Cost1.

hope this helps
Steve

But you can't change the value of Cost to depend on Cost1. As written the
formula by itself could not cause a circular reference.

-Jack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top