+ Reply to Thread
Results 1 to 5 of 5

Enter a value in a cell depaending on the value of another cell

  1. #1
    Registered User
    Join Date
    12-29-2016
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    2

    Enter a value in a cell depaending on the value of another cell

    Hi guys, I am very new to excel and I am stuck. Basically I have a spreadsheet with all my staff on it and it calculates their start date to give me years employed. I know want another column to calculate their extra holiday entitlement. So after 5 years employed they get an extra 2 days holiday, and every year after 1 day. I need to know how to set a formula that will produce the right results e.g.

    If column A1 is between 5 and 5.99 column B1 should be 2
    if column A1 is between 6 and 6.99 column B1 should be 3
    if column A1 is between 7 and 7.99 column B1 should be 4
    if column A1 is above 8 column B1 should be 5

    is there a way of doing this as I am stuck.

    thanks Scott

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,943

    Re: Enter a value in a cell depaending on the value of another cell

    Welcome to the forum!

    You need to cater for below 5. In B1 copied down:

    =LOOKUP(A1,{0,5,6,7,8},{1,2,3,4,5})
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Enter a value in a cell depaending on the value of another cell

    Quote Originally Posted by Mr Lynton View Post

    If column A1 is between 5 and 5.99 column B1 should be 2
    if column A1 is between 6 and 6.99 column B1 should be 3
    if column A1 is between 7 and 7.99 column B1 should be 4
    if column A1 is above 8 column B1 should be 5
    you can try also
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-29-2016
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    2

    Re: Enter a value in a cell depaending on the value of another cell

    Thanks AliGW

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,943

    Re: Enter a value in a cell depaending on the value of another cell

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 1
    Last Post: 03-25-2016, 01:31 AM
  2. Replies: 1
    Last Post: 03-25-2016, 01:16 AM
  3. [SOLVED] Enter number in blank cell match number on sheet 2 & enter data from adjacent cell
    By Bikeman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-10-2015, 08:36 PM
  4. Replies: 5
    Last Post: 06-01-2015, 03:38 PM
  5. [SOLVED] If month in cell A is equal to number in cell B then enter cell C
    By badincite in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 05-02-2015, 12:27 PM
  6. [SOLVED] How do I create a button to enter a number in a cell and then tab/enter to next cell
    By MatiasGarcia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2013, 05:29 PM
  7. [SOLVED] Return alt-enter when enter is pressed in a specific cell
    By bigsteve in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2013, 10:21 AM

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