+ Reply to Thread
Results 1 to 6 of 6

Return Data Value based upon a x and y value that corresponds to table of x and y range

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    Mobile, AL
    MS-Off Ver
    Excel 2003
    Posts
    4

    Return Data Value based upon a x and y value that corresponds to table of x and y range

    I have a spreadsheet that has the following layout (The layout is basically the coordinates of a square grid):

    Name, top left x, top left y, top right x, top right y, bottom left x, bottom left y, bottom right x, bottom right y.



    Given a set of input x and y values, I want to return the "name" cell value where the x and y input values fit inside the given top left, top right, bottom left and bottom right boundaries.

    Any Help would be greatly appreciated.

    Thanks,

    marty

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Return Data Value based upon a x and y value that corresponds to table of x and y rang

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-05-2012
    Location
    Mobile, AL
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Return Data Value based upon a x and y value that corresponds to table of x and y rang

    Sure no problem. I have attached an excel spreadsheet with the prompt input on sheet 1 and the look up data on sheet 2. Basically you enter your x and y coordinates on sheet 1 and the "Description Found" cell from sheet 1 is populated with the description from sheet 2 where the input x,y coordinates from sheet 1 fall in a given block (top x,y bottom x,y) from the sheet 2 data grid.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Return Data Value based upon a x and y value that corresponds to table of x and y rang

    Put this in cell B4 using control-shift-enter after you type it in:
    =OFFSET(Sheet2!A1,SUMPRODUCT(ROW(Sheet2!A1:A12),--(Sheet2!B2:B13<Sheet1!B2),--(Sheet2!H2:H13>Sheet1!B2),--(Sheet2!C2:C13<Sheet1!B3),--(Sheet2!I2:I13>Sheet1!B3)),0)
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  5. #5
    Registered User
    Join Date
    11-05-2012
    Location
    Mobile, AL
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Return Data Value based upon a x and y value that corresponds to table of x and y rang

    PauleyB,

    You nailed it.

    Thank you very much!

    Marty

  6. #6
    Registered User
    Join Date
    11-05-2012
    Location
    Mobile, AL
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Return Data Value based upon a x and y value that corresponds to table of x and y rang

    PaulyB,

    The formula works in excel but does not work on an excel document that I upload to google documents as a google spreadsheet.

    It gives a parse exception. If I remove the -- in the formula then it will at least evaluate but does not give the correct answer.

    Any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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