Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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(A120,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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi: The formula is M36=M35*0.01 What I would like to be able to do is assign a button to run th formula whenever I want to calculate the tax. I cannot specify th condition because it's arbitrary, It depends on variuos variables tha maybe present at the same time but maybe not. That is why I woul prefer to control when the formula is applied. thank -- jadeyes261 ----------------------------------------------------------------------- jadeyes2612's Profile: http://www.excelforum.com/member.php...fo&userid=2511 View this thread: http://www.excelforum.com/showthread.php?threadid=46628 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
control end in a macro | Excel Worksheet Functions | |||
Control button / macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
How does Solversolve Control Macro | Excel Programming | |||
Macro control | Excel Programming |