+ Reply to Thread
Results 1 to 2 of 2

Combining a IF function and lookup function

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Combining a IF function and lookup function

    Attachment 330782Attachment 330788Attachment 330790HI

    I don't know if is the best way of doing this and even if this will work!. I am trying to match up the data from a bat detector to a collection of video files. The video camera creates a new file ever 30:00 mins or ever 1 hour depending on the quality setting.

    So firstly,I am wanting to determine the video file name i need to watch using the time and date of the bat pass against the start time/date and end time/date of the video i.e. if it falls in between them. Then from this I want to determine the run time on the video, so i can just watch the bit of the video containing the bat.

    I have the video information in one sheet and the bat data in the other. I thought i could use a if statement combined with a lookup to return the video file name. And then determine the video run time from the time of the bat and video start time.

    some like this =IF(AND(H3>=Sheet2!Z:Z,H3<=Sheet2!AA:AA),LOOKUP(H3,video!X:X,video!J:J),0)

    it not working though, anyone got any ideas please









    Attachment 330790
    Attached Files Attached Files
    Last edited by Trottlips; 07-08-2014 at 05:10 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining a IF function and lookup function

    Q3: =LOOKUP(H3,video!X:X,video!J:J)
    R3: =INDEX(Sheet2!Q:Q, MATCH($Q3, Sheet2!$L:$L, 0))
    S3: =(INDEX(Sheet2!P:P, MATCH($Q3, Sheet2!$L:$L, 0))-INDEX(Sheet2!O:O, MATCH($Q3, Sheet2!$L:$L, 0)))*24 (formatted as General)

    Those formulas all error in row 3, but when you copy down the rest resolve correctly.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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] Combining Text Function with Indirect Function
    By ninmjj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-31-2013, 10:34 AM
  2. [SOLVED] Nested IF Function or LOOKUP Function
    By rstephen in forum Excel General
    Replies: 4
    Last Post: 07-03-2012, 09:42 PM
  3. combining an IF function with an INDEX array function?
    By Chris.eagle99 in forum Excel General
    Replies: 1
    Last Post: 03-01-2012, 04:43 AM
  4. combining --mid function with ifiserror function
    By kadi in forum Excel General
    Replies: 5
    Last Post: 06-27-2011, 04:40 PM
  5. Combining IF function with OR function
    By Need_Excel_Help in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2010, 09:50 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