+ Reply to Thread
Results 1 to 5 of 5

Vlookup affecting an IF formula

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Darlington, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Vlookup affecting an IF formula

    Hi

    I am using the following formula in IA7 to work out total hours between the end of one shift and the start of another:

    =IF(ISBLANK(HW7),"",IF(IB7="","",MOD(IB7-HX7,1)))

    This was working fine until I entered a Vlookup formula into HW7 which now enters 00.00 into the cell and therefore throws off the above formula -

    Basically if HW7 = 00.00, then I want IA7 to remain blank, as soon as other values are entered, I need the calculation to work - any suggestion on how I can do this?

    Thanks in Advance

  2. #2
    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: Vlookup affecting an IF formula

    Hi,

    Presumably

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Vlookup affecting an IF formula

    Use

    =IF(OR(HW7=0,IB7=""),"",MOD(IB7-HX7,1))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    Darlington, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Vlookup affecting an IF formula

    Hi

    Thank You both for your quick replies - Richard I did try your suggested formula intially but Excel came back with an error and a solution involving a * between the two statements - However I must have madee an entry mistake as it works great now!! (there's only so many brackets and "" you can look at before they all blur into one)

    Thank you both again!

  5. #5
    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: Vlookup affecting an IF formula

    Quote Originally Posted by kj2607 View Post
    Hi

    Thank You both for your quick replies - Richard I did try your suggested formula intially but Excel came back with an error and a solution involving a * between the two statements - However I must have madee an entry mistake as it works great now!! (there's only so many brackets and "" you can look at before they all blur into one)

    Thank you both again!
    Indeed, but don't forget you can also use drag your cursor across any formulae you are given in this forum to highlight it and then use the normal Copy and Paste to paste it in your workbook.

+ 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: 7
    Last Post: 10-25-2012, 05:58 AM
  2. Replies: 2
    Last Post: 01-16-2012, 08:14 PM
  3. Add a word or Symbol after a formula without affecting it
    By Trueman_86 in forum Excel General
    Replies: 2
    Last Post: 07-12-2010, 11:05 AM
  4. Problem with blank cells affecting formula
    By Gooford in forum Excel General
    Replies: 4
    Last Post: 09-30-2009, 06:49 AM
  5. Formula affecting two columns
    By Brian30 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-02-2008, 05:48 AM

Tags for this Thread

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