+ Reply to Thread
Results 1 to 20 of 20

FORMULA: something like VLOOKUP

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    FORMULA: something like VLOOKUP

    Hello here, first of all I would like to apologize for my english.

    I have 2 columns (A= date; B=share price)
    A.................B

    1.1.12 ....... 1,5
    5.1.12 ....... 1,3
    8.1.12 ....... 1,8
    10.1.12 ..... 1,4
    13.1.12 ..... 2,1

    In C1 I type the price of share and I need to get date when this share reached that value. For example:
    In C1 I type: 1,8 and the result = 8.1.12.....I wanna type for example 2,0854 and the result would be 13.1.12

    I tried INDEX(A1:A5; MATCH(C1; B1:B5; -1)) but when I type the value higher than first value (for example 1,8) it says #N/A

    So could you help me to figure it out? I would very appreciate it. Thx!
    Last edited by Creatives; 11-18-2012 at 06:26 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    When you get #N/A the value is not available.

    Change the blue cell in the attached file and see #N/A pops up.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: FORMULA: something like VLOOKUP

    Try

    =index(A1:A5;min(if(B1:B5>=C1;row(B1:B5))))

    Array confirmed with Shift Ctrl Enter.

  4. #4
    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: FORMULA: something like VLOOKUP

    Hi,

    =INDEX(A1:A5,MATCH(C1;B1:B5)+1;1)
    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.

  5. #5
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    Its not working for values lower than first value(1,5)
    Last edited by jeffreybrown; 11-18-2012 at 11:05 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  6. #6
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @jason

    It works for A1:B5 but not for my bigger database. I have 1113 cells and its not working . Its really chaotic and I cant figure out wheres the problem.
    Last edited by jeffreybrown; 11-18-2012 at 11:06 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  7. #7
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Post Re: FORMULA: something like VLOOKUP

    Example.xlsx
    Attached file

  8. #8
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,
    It works only for exact values like 1,5; 1,3; 1,8 etc not for 1,44; 1,39
    Last edited by jeffreybrown; 11-18-2012 at 11:06 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    And your result in #7 is correct, or we have to change the formula?

    If there is no exact match, which value should be showed.

    The next value above or the next value below?

  10. #10
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,

    Number(date) of value when value reached required price.
    For example

    1 ... 0,8
    2 ... 1,4
    3 ... 0,7
    4 ... 1,1

    requiered value = 0,9 so the result would be (2)
    Imagine the curve..

    So the answer is next value below but it doesnt matter I allways can add +1 to number
    Last edited by jeffreybrown; 11-18-2012 at 11:07 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    I sorted the table.

    See the yellow cells.

    See if the result (217) is what you wanted.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,
    I really appreciate your working but its wrong. The right answer with 0,6 would be 855.
    It has to be first interval when value is reached so 0,6 is between 0,6181 - 0,5965 (856 - 855) I think
    What about to create intervals? But I have no experience with intervals
    Last edited by jeffreybrown; 11-18-2012 at 11:07 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    Maybe i can't help you with that (if it is depending on several intervals).

    But how do you define which interval need to be found (first / 2nd or 3th)?

  14. #14
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,

    It has to be the FIRST one. Imagine days and values... day by day, value by value. From the top goes days to the bottom . You wanna sell share when share reaches required price. So you say: I wanna sell this share when reaches 0,9. So first time when share reaches that value is at 1061 (0,9146 - 0,8928)
    Last edited by Creatives; 11-18-2012 at 01:32 PM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    See if this is, what you're up to.

    See the yellow cell in the attached file.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,
    We are at the beginning. When I type value higher than first one it (1,044) it says #N/A (
    Last edited by Creatives; 11-18-2012 at 01:32 PM.

  17. #17
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: FORMULA: something like VLOOKUP

    Unfortanly i don't have an answer for your question.

    Maybe wiht a new view later this week.

  18. #18
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    @oeldere,
    I really appreciate it.
    ANy ideas someone else? :-(( I am really desperate
    Last edited by Creatives; 11-18-2012 at 01:38 PM.

  19. #19
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: FORMULA: something like VLOOKUP

    The array formula needs to be adjusted to allow for the index range not starting in row 1.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    10-30-2012
    Location
    Czech republic
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: FORMULA: something like VLOOKUP

    I figure it out. Your Formula really helped me!
    I added 2 cells (Stop limit and Stop loss) (max value and min value) for max value I am using formula: =INDEX(A3:A1115,MIN(IF(B3:B1115>=C1,ROW(B3:B1115)-ROW(B3)+1,"Neznámá chyba"))) it works for values higher than first one. And for min value I am using =INDEX(A3:A1115;MATCH(C2;A3:A1115;-1)) it works for values lower than first.


    SOLVED
    Last edited by Creatives; 11-19-2012 at 05:07 AM.

+ 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