duration days

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all
i want to ask about this calculation:
if i have a date for sell and the date for billing and i want to caculate
the diffrence between them with a quirey if the days more than 10 days the
result no discount and if it is less than 10 days it eill be extra discount
like 3% and if the days more than 20 days that means tax 10% can any body
help me?
 
=IF(DATEDIF(A1,B1,"D")<=10,(C1*0.97),IF(DATEDIF(A1,B1,"D")>20,(C1*1.1),0))
for this example
place the start date in A1
Current Date in B1
Value to be calculated in C1
Copy and pste this formula in D1

Dave
 
Try this using the same cells that Curly referred to:
=IF(DATEDIF(A1,B1,"D")<=10,(C1*0.97),IF(DATEDIF(A1,B1,"D")<=20,(C1*1),IF(DATEDIF(A1,B1,"D")>20,(C1*1.1),0)))
This one assumes that if the number of days is in between 10 and 20, then no
change in price is applied which is what I think that Curly's formula was
missing. Other than that, it worked fine for me!
 
thanks alot
it is well done
but i want to count how many days between this two date?

"Tom" كتب:
 
On Sat, 26 Aug 2006 03:29:01 -0700, jack nelson <jack
hi all
i want to ask about this calculation:
if i have a date for sell and the date for billing and i want to caculate
the diffrence between them with a quirey if the days more than 10 days the
result no discount and if it is less than 10 days it eill be extra discount
like 3% and if the days more than 20 days that means tax 10% can any body
help me?

A1: Sell Date
B1: Bill Date
C1: Cost

And your specifications don't indicate what you want to happen if the days is
exactly equal to ten days, so I made an assumption:

=C1*IF((B1-A1)<=10,0.97,IF((B1-A1)<=20,1,1.1))
--ron
 
To count the number of days simply put into a cell:
=B1-A1
make sure that the cell you enter this formula into is formatted for GENERAL
otherwise a date format will be applied.

Tom
 
hi ron,
i said if the A1 less than ten days the result will be the Poundage for the
sales man. if it is more than ten days and less than twenty days no Poundage
if the date more than twenty dates the sales man will get a Deduction
that way help my to calculate the salary for the sales man


"Ron Rosenfeld" كتب:
 
hi ron,
i said if the A1 less than ten days the result will be the Poundage for the
sales man. if it is more than ten days and less than twenty days no Poundage
if the date more than twenty dates the sales man will get a Deduction
that way help my to calculate the salary for the sales man

Did the formula I provided do what you want?

In your description you do not include what you want to happen if the
difference is exactly equal to ten days or exactly equal to 20 days.

You wrote three conditions:

"less than ten days ...
"more than ten days and less than twenty days ...
"more than twenty dates ...

So you have described what you want to happen if the value is "less than 10
days" or "more than ten days" but neither of those options include the value
being "equal to ten days".


I assumed when you wrote "less than ten days" that you meant "less than or
equal to ten days", and the same with twenty days. If that is not what you
want, you can alter the comparison operators appropriately in the formula I
provided.

"Ron Rosenfeld" ???:

--ron
 
hi ron,
thank you for your comment
this is exactly what i mean and i will notice that in future.
thanks again for every thing

"Ron Rosenfeld" كتب:
 

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

Back
Top