I use an invoice form in which I have to charge a tax for some of the sales, I want to be able to control the formula so it only applies when I want. Can I do that with a macro? Please Help ME!
I use an invoice form in which I have to charge a tax for some of the sales, I want to be able to control the formula so it only applies when I want. Can I do that with a macro? Please Help ME!
Would need more info: what is your formula, and how do you decide when it
applies? You can probably handle this through normal formulas (no need for a
macro) by using the IF function;
Worksheet version: =IF(condition,formula1,formula2)
applies formula1 if the condition is true, otherwise formula2
Example - I will have it apply a 7% tax if the amount in A1 is greater than
$20, otherwise no tax applies:
=IF(A1>20,A1*1.07,A1)
If you need to put this in a macro, here is a VBA version:
If Range("A1").Value > 20 Then
Tax = Price * 0.07
Else
Tax = 0
End If
Price = Price + Tax
--
- K Dales
"jadeyes2612" wrote:
>
> I use an invoice form in which I have to charge a tax for some of the
> sales, I want to be able to control the formula so it only applies
> when I want. Can I do that with a macro? Please Help ME!
>
>
> --
> jadeyes2612
> ------------------------------------------------------------------------
> jadeyes2612's Profile: http://www.excelforum.com/member.php...o&userid=25119
> View this thread: http://www.excelforum.com/showthread...hreadid=466281
>
>
Hi:
The formula is M36=M35*0.01
What I would like to be able to do is assign a button to run the formula whenever I want to calculate the tax. I cannot specify the condition because it's arbitrary, It depends on variuos variables that maybe present at the same time but maybe not. That is why I would prefer to control when the formula is applied.
thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks