473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

It is a formula in excel to execute employee tax,meanwhile i want to use it Access.so

Expand|Select|Wrap|Line Numbers
  1. =if(p5>5000,p5*0.35-662.5,if(p5>3551,p5*0.3412.5,if(p5>2351,p5*0.25-235,if(p5>1401,p5*0.2-117.5,if(p5>651,p5*0.15-47.5,if(p5>=151,p5*0.1-15,0))))))
Where
P5=Gross salary
Jul 25 '14 #1

✓ answered by SamuelTad

Hi Twinny appreciate for quick respond!!
I put everything in this manner but it says syntax error
Expand|Select|Wrap|Line Numbers
  1. iif([Gross Salary]>[5000]
  2.    ,[Gross Salary]*[0.35-662.5]
  3.    ,IF([Gross Salary]>[3551]
  4.       ,[Gross Salary]*[0.3-412.5]
  5.       ,iif([Gross Salary]>[2351]
  6.          ,[Gross Salary]*[0.25-235]
  7.          ,iif([Gross Salary]>[1401]
  8.             ,[Gross Salary]*[0.2-117.5]
  9.             ,iif([Gross Salary]>[651]
  10.                ,[Gross Salary]*[0.15-47.5]
  11.                ,iif([Gross Salary]>=[151]
  12.                      ,[Gross Salary]*[0.1-15,0]
  13. ))))))

6 998
twinnyfo
3,653 Expert Mod 2GB
Is there a specific question here? We are willing to help, but you have given us nothing to go on.
Jul 25 '14 #2
Well to make my self clear,P5 is Gross salary,therefore if salary is > $5000.00 tax is undergoes like "P5 * 35% then subtract 662.5 from the new Gross salary" up to the least salary.so convert this formula in to access expression.thanks!!
Jul 25 '14 #3
twinnyfo
3,653 Expert Mod 2GB
You are actually already there, but you need to change the "If" statements to "IIf" statements. It should translate perfectly....
Jul 25 '14 #4
Hi Twinny appreciate for quick respond!!
I put everything in this manner but it says syntax error
Expand|Select|Wrap|Line Numbers
  1. iif([Gross Salary]>[5000]
  2.    ,[Gross Salary]*[0.35-662.5]
  3.    ,IF([Gross Salary]>[3551]
  4.       ,[Gross Salary]*[0.3-412.5]
  5.       ,iif([Gross Salary]>[2351]
  6.          ,[Gross Salary]*[0.25-235]
  7.          ,iif([Gross Salary]>[1401]
  8.             ,[Gross Salary]*[0.2-117.5]
  9.             ,iif([Gross Salary]>[651]
  10.                ,[Gross Salary]*[0.15-47.5]
  11.                ,iif([Gross Salary]>=[151]
  12.                      ,[Gross Salary]*[0.1-15,0]
  13. ))))))
Jul 25 '14 #5
twinnyfo
3,653 Expert Mod 2GB
Remove all the braces from around your numbers:

Expand|Select|Wrap|Line Numbers
  1. =IIf(p5>5000
  2.    ,p5*0.35-662.5
  3.    ,IIf(p5>3551
  4.       ,p5*0.3412.5
  5.       ,IIf(p5>2351
  6.          ,p5*0.25-235
  7.          ,IIf(p5>1401
  8.             ,p5*0.2-117.5
  9.             ,IIf(p5>651
  10.                ,p5*0.15-47.5
  11.                ,IIf(p5>=151
  12.                   ,p5*0.1-15
  13.                   ,0)
  14. )))))
Jul 25 '14 #6
Cheer,thanks a lot it works!!
Jul 25 '14 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mrs Howl | last post by:
I don't know if there's even a way to do what I want. I click on a button in an Access form, and it opens an instance of Excel, and opens a workbook and runs a macro that's in it. So far, fine,...
6
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
1
by: SteveBark | last post by:
Hello all I am currently trying to develop a script that will take a value from an Excel spreadsheet cell and use that to run a query against an Access table to delete all rows that match the...
3
by: Akinyemi | last post by:
I am creating a database in MSAccess 2000 for my Payroll Program I am writing. I want to save an image representing an employee in the record of each employee. I then want to post the name of each...
2
by: solargovind | last post by:
Hi, Can anybody suggest me how to take data from an Excel file without import into Access as a Table..? Bcoz...I hve several file. if i import, it would take more time and increase the file...
6
by: deejow | last post by:
Hi, I want Access to return an error message that says an identical entry already exists. I do not want to set the field to 'no duplicates' because it is a name field and it is possible to have...
3
by: keirnus | last post by:
Hello once again... I made a function in Excel. The function does some error checking within the Excel file. To be easy for me, I want my code in MS Access to simply call the function in Excel....
3
by: harry2012 | last post by:
Hello, I do have an access form called T4, which is exported to an excel file, where i do have complex formulas and calculations. I would some assistance in exporting the table to excel. I...
1
by: Monique | last post by:
I am a new Access user and have taught myself through youtube videos and professional blogs like this one. The database I have created is working wonderfully, and is doing everything that I ask of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.