你想怎么算我都不知道,怎么写啊?那么你想怎么用VBA编程啊?是固定还是自定义函数
Functiontax(xVualeAsDouble,MVualeAsDouble)AsDoubleDimLvAsDouble,TaxrateAsLong,yVualeAsDoubleyVuale=xVuale-MVualeSelectCaseyVualeCaseIs<500Lv=0.05Taxrate=0CaseIs<2000Lv=0.1Taxrate=25CaseIs<5000Lv=0.15Taxrate=125CaseIs<20000Lv=0.2Taxrate=375CaseIs<40000Lv=0.25Taxrate=1375CaseIs<60000Lv=0.3Taxrate=3375CaseIs<80000Lv=0.35Taxrate=6375CaseIs<100000Lv=0.4Taxrate=10375CaseIs>=100000Lv=0.45Taxrate=15375EndSelecttax=yVuale*Lv-TaxrateEndFunction