+ Reply to Thread
Results 1 to 3 of 3

calculate salary problem

  1. #1
    Registered User
    Join Date
    08-09-2016
    Location
    Chennai
    MS-Off Ver
    2007
    Posts
    11

    calculate salary problem

    Please Login or Register  to view this content.


    Using above code I would calculate salary for all the employee in sheet (“Earnings”). But when I execute the code it’s not work .I think the problem for calculate T.A only. The procedure for calculation of T.A is follows:

    First check column 8 of Employee sheet( i.e Grade Pay) , if grade Pay is 1800 to 1900 then
    Sheets("Earnings").cells(i, 10) = 900 + Round(900 * cells(4, 22), 0).
    If grade pay 2000 to 4800 then
    Sheets("Earnings").cells(i, 10) = 1800 + Round(1800 * cells(4, 22), 0)
    If grade pay >= 5400 then
    Sheets("Earnings").cells(i, 10) = 3600 + Round(3600 * cells(4, 22), 0)

    Kindly help in this task.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: calculate salary problem

    Your havent Ended the Select

    Please Login or Register  to view this content.
    Additionally however a number of values wouldnt fit into that TA calc, what if they earned 4900?
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: calculate salary problem

    Hi,

    You don't of course need a macro at all. It's over complicating it.

    If you created a VLOOKUP table that looked up the Grade Pay and returned the relevant index column number for the matrix then a simple INDEX(MATCH()) formula in the new Basic Pay column would suffice.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. calculate salary for specific range
    By malarvel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2016, 05:53 AM
  2. How to calculate Gross Salary from given Net Salary
    By Basab in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-17-2015, 01:15 AM
  3. calculate 4 different tiers of commission with fix salary
    By shintaro in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-08-2014, 01:18 AM
  4. [SOLVED] Calculate salary average
    By monid78 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-24-2013, 10:02 AM
  5. calculate salary by every minute
    By jeevan123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2013, 06:43 PM
  6. calculate years worked by 3% * salary in excel
    By laurentium3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2006, 08:45 PM
  7. How to calculate pension contribution on salary?
    By pgruening in forum Excel General
    Replies: 4
    Last Post: 09-07-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1