+ Reply to Thread
Results 1 to 3 of 3

Return specific formula based on information

  1. #1
    Registered User
    Join Date
    09-09-2012
    Location
    Dudley
    MS-Off Ver
    Excel 2003
    Posts
    33

    Return specific formula based on information

    Hi all,

    Need a little help here, I've tried and failed miserably.

    Here's my problem.

    My girlfriend needs a time schedule sheet for work.

    The problem is this...

    If she works half an hour she gets paid £10 per half.
    If she works over half hour it becomes £16 per hour.

    In columns B and C, I put the start and end times of work, formatted to "TIME", and in column F, I have a formula to multiply the work hours from column E, based on its value (multiply by £10 if half hour, by £16 if an hour)...and add the total for that week in F14.

    I can't for the life of me however, find out how to return "zero" in column F if there's no start or end times entered in B and C.

    It keeps returning £10....

    Obviously then, the end of week balance (F14), is showing as £76...instead of only £26, as the other days when she DIDN'T work, still show a value of £10....when I want it to return zero....

    Hope this makes sense.

    I've been trying for 3 hours already but just can't crack it.

    Any suggestions would be appreciated.

    Workbook uploaded.
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Return specific formula based on information

    maybe =IF(E7=0,"",IF(E7>0.5, (E7*16), IF(E7<0.98, (10*1), 0)))
    Last edited by Sam Capricci; 01-24-2020 at 06:20 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Return specific formula based on information

    another option is =IF(E7=0,0,IF(E7>0.5, (E7*16), IF(E7<0.98, (10*1), 0)))
    the reason it was returning 10 is because your last argument "IF(E7<0.98,(10*1)" (by the way this would be the same IF(E7<0.98,10,0) )
    but that last argument is saying anything less than 0.98, return 10, well the value of zero in E7 is less than 0.98 so that is why you were getting the 10.

    If statements work in order of what they find going from left to right and so the first argument it finds that fulfills the IF statement that is the one it takes.

    =IF(E7=0,0,IF(E7>0.5, (E7*16), IF(E7<0.98,10, 0))) would give you the same. Multiplying 10 by 1 just gives you 10.

+ 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. [SOLVED] Protect cells based on specific information
    By fabian_76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2019, 01:28 PM
  2. Replies: 4
    Last Post: 01-16-2019, 12:35 PM
  3. [SOLVED] How do I return specific results based on information in other cells.
    By bradfordahill in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-01-2018, 06:00 PM
  4. Formula to pull information based on information in different cells.
    By apmi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-26-2014, 03:57 PM
  5. Sorting information based on specific text
    By muhasenul in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2014, 07:31 PM
  6. [SOLVED] Formula to return specific text based on multiple cells meeting a single criteria
    By missydanni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2013, 09:48 AM
  7. [SOLVED] Return a value based on different information in one cell
    By Shezza in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-23-2013, 01: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