+ Reply to Thread
Results 1 to 5 of 5

Need help: To get the preferred data

  1. #1
    Registered User
    Join Date
    05-28-2016
    Location
    india
    MS-Off Ver
    office7
    Posts
    2

    Need help: To get the preferred data

    First of all I am very new and inexperienced, so kindly bear with me.

    My problem:
    I have the following table as source data

    Term>>>>>>>>60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240
    Factor>>>>>>> 5.4 6.25 7.1 7.95 8.8 9.65 10.5 11.35 12.2 13.05 13.95 14.8 15.7 16.6 17.5 18.45

    Now need a formula so that if the term matches exactly then the corresponding factor is obtained

    For e.g. Term> 60
    Desired Factor > 5.4

    But if the term is in between, factor returned must be the higher one

    Say Term> 61
    Desired factor> 6.25

    I tried to use HLOOKUP but couldn't solve the program.

    Please help

  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
    52,936

    Re: Need help: To get the preferred data

    Hi, welcome to the forum

    If you want an exact match, try this...
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    1
    Term
    60
    72
    84
    96
    108
    120
    132
    144
    156
    168
    180
    192
    204
    216
    228
    240
    2
    Factor
    5.4
    6.25
    7.1
    7.95
    8.8
    9.65
    10.5
    11.35
    12.2
    13.05
    13.95
    14.8
    15.7
    16.6
    17.5
    18.45
    3
    4
    5
    Term
    60
    6
    Factor
    5.4

    B6=IFERROR(INDEX($B$2:$Q$2,MATCH(B5,$B$1:$Q$1,0)),"")
    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
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Need help: To get the preferred data

    See VLOOKUP higher value

    Cheers
    <-- If you're happy & you know it...click the star.:-)

  4. #4
    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
    52,936

    Re: Need help: To get the preferred data

    OK if you want it to jump to the next level if no exact, use this instead...
    =IFERROR(INDEX($B$2:$Q$2,MATCH(B5,$B$1:$Q$1)+IF(HLOOKUP(B5,$B$1:$Q$1,1,1)<B5,1,0)),"")

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,745

    Re: Need help: To get the preferred data

    Hlookup - if set to TRUE will use the largest value that is less than ‘lookup_value’.

    so 61 will return 5.4

    assuming
    Term in A1:Q1
    Factor in A2:Q2

    the value to lookup is in A5

    try using
    =INDEX($B$2:$Q$2,MATCH(TRUE,INDEX($B1:$Q1>=$A$5,0),0))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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. HELP! Trying to match students to preferred roommates
    By KTNWINDWARD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2015, 04:02 AM
  2. Excel VBA to open new outlook message with signature and preferred body text format
    By morayman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2013, 10:01 AM
  3. [SOLVED] SUM of preferred cells in two ranges.
    By tomshanan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2013, 07:34 AM
  4. Add lines (arrows preferred) between related series of XY scatter
    By AlvaroSiza in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-15-2012, 04:28 AM
  5. [SOLVED] Accrued unpaid preferred interest
    By bdwttu in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-06-2012, 04:20 PM
  6. MsgBox if the Active Cell is not within a preferred Range
    By Winon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2011, 05:52 AM
  7. [SOLVED] preferred app?
    By nastech in forum Excel General
    Replies: 0
    Last Post: 11-25-2005, 11:20 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