+ Reply to Thread
Results 1 to 7 of 7

Help with output from an array

  1. #1
    Registered User
    Join Date
    10-18-2019
    Location
    Denmark
    MS-Off Ver
    2016 Excel
    Posts
    2

    Help with output from an array

    Hello,
    Excel 2016
    I have an array similar to this:
    20 447
    21 5018
    22 5624
    23 6291
    24 7028
    25 7842
    26 874
    27 973
    28 10824
    29 12031
    30 13363
    The array starts from 1 to 120, so it is 120 different cells to read.
    The thing i would like help to, is:
    If the input cell is between 447 to 5017 the output cell with the formula shows 20.
    If the input cell is between 5018 to 5623 the output cell with the formula shows 21, and so on.

    Is this possible without the use of 120 different IF functions in the same formula?

    //Boehnke
    Last edited by boehnke; 10-18-2019 at 06:06 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Help with output from an array

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Help with output from an array

    May be something like below

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Ser No Input Output
    2
    20
    5017
    20
    447
    20
    3
    21
    5018
    21
    5018
    21
    4
    22
    5624
    21
    5
    23
    6291
    21
    6
    24
    7028
    21
    7
    25
    7842
    21
    8
    26
    874
    20
    9
    27
    973
    20
    10
    28
    10824
    21
    11
    29
    12031
    21
    12
    30
    13363
    21
    Sheet: Sheet1

    C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: Help with output from an array

    Yes. use this formula:

    =LOOKUP(A2,$I$2:$I$12,$H$2:$H$12)

    You may need ; as the separator. see sheet for layout.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Help with output from an array

    Sorry I misunderstood the question. Glenn has given exactly what you want.

  6. #6
    Registered User
    Join Date
    10-18-2019
    Location
    Denmark
    MS-Off Ver
    2016 Excel
    Posts
    2

    Re: Help with output from an array

    Thank you, it worked like a charm.

    //Boehnke

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: Help with output from an array

    You're welcome...You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] output array(1,4) without inner loop
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2019, 07:24 AM
  2. VBA array input array output problem
    By financerelated in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2017, 04:07 PM
  3. [SOLVED] Array to embed formula and if number of output is met output Blank
    By ywang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2015, 02:34 AM
  4. output array in each row
    By michelgirault in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-19-2013, 06:09 AM
  5. Array function only displays first value of array as output
    By q-tip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2013, 12:51 PM
  6. Output a 3D array
    By bsamuels in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2013, 11:25 AM
  7. [SOLVED] Excel 2003 Array as input - how to place output in a second array?
    By theelkhunter in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-10-2013, 02:04 PM

Tags for this Thread

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