+ Reply to Thread
Results 1 to 6 of 6

Lookup function for data

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    Rotterdam, The netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Lookup function for data

    I am collecting data, but now I want to put this specific data in lines so that I do not have any blanks anymore.

    Naamloos.jpg

    Column G - J are formulas of the dates from row 1 compared to the date in column A. So how many days there are in between these two dates. (30-nov minus 7 okt = 54 )

    This is the data I want to transform into:

    In array A10 - M16 I want to build a formula that matches the date in column A and than looks for the days by looking at the array G2 - J7.
    I was trying it myself with a V-Lookup function, but this function doesn't let me search in the array that starts at column E to lookup the value in array Column B-D
    Last edited by Pieter1901; 01-20-2014 at 09:01 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Lookup function for data

    To make an equivalent of VLOOKUP /HLOOKUP but not based "reference values" in first column/row of the area use function INDEX with embedded MATCH

    So, for instance, while
    VLOOKUP(A1,B1:D100,3,false)
    can be written as
    INDEX(D1:D100,MATCH(A1,B1:B100,0))
    both formula have reference in column B and return value from column D


    There is no VLOOKUP version of
    INDEX(B1:B100,MATCH(A1,D1:D100,0))
    (reference values in column D and returned values in column B)
    Last edited by Kaper; 01-20-2014 at 09:29 AM.

  3. #3
    Registered User
    Join Date
    01-20-2014
    Location
    Rotterdam, The netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Lookup function for data

    Thanks, only when I use the match function. I am not able to match the column yet.

    =INDEX($A$1:$J$7;MATCH($A11;$A$1:$A$7;0);MATCH(B$10;$F$1:$J$7;0))

    How can I change this function so it matches the column?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Lookup function for data

    Hi Pieter,

    1) Attachment clarifies a lot. Really.

    2) I suppose the match range for columns is too high (shall be 1 row). Try rather something like:

    =INDEX($A$1:$J$7;MATCH($A11;$A$1:$A$7;0);MATCH(B$10;$F$7:$J$7;0))
    or
    =INDEX($A$1:$J$7;MATCH($A11;$A$1:$A$7;0);MATCH(B$10;$F$1:$J$1;0))

    just one row.

  5. #5
    Registered User
    Join Date
    01-20-2014
    Location
    Rotterdam, The netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Lookup function for data

    Thanks! It works!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Lookup function for data

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Lookup function to reshape data
    By prawer in forum Excel General
    Replies: 2
    Last Post: 06-17-2009, 02:25 PM
  2. Function to lookup data
    By mridzuani in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2009, 10:45 PM
  3. LOOKUP function for unsorted data
    By wimfrits in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2008, 02:38 AM
  4. lookup and get data function
    By germanjulian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-07-2007, 12:21 PM
  5. Help looking up data that a lookup function won't!
    By SBells in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-08-2006, 04:50 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