+ Reply to Thread
Results 1 to 9 of 9

Find a number that matches the most significant digits and provide row / column result

  1. #1
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Find a number that matches the most significant digits and provide row / column result

    See attached Spreadsheet.

    I have a spreadsheet that has a matrix of numbers in A2:D9. The number can be of lengths 3 to 6 digits with the possibility some cells are blank. I have a column of 6 digit codes found in A13:A16 that I need is a formula that will find the row that matches the first 3 or 4 or 5 or 6 digits then display the Value of that row across for the match in Column E2:E9 and display it in the "type" column B13:B16 and that row across for the match in Column F2:F9 and display it in the"Multiplier" column C13:C16 adjacent to the "Values to search" found in A13:A16.

    The correct result are show in cells B13:C16 but they need to be replaced with a formula. The Values to search will always be 6 digits in length but the codes it is look to match can be of any length.

    I hope that makes sense??

    Thanks in advance for the help.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Find a number that matches the most significant digits and provide row / column result

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Find a number that matches the most significant digits and provide row / column result

    Quote Originally Posted by tim201110 View Post
    Please Login or Register  to view this content.
    Is there a formula I can use instead of a macro?

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Find a number that matches the most significant digits and provide row / column result

    i wish i could find a solution with worksheet formulas
    there is no macro in my solution, it is a user defined function

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Find a number that matches the most significant digits and provide row / column result

    ARRAY formula in E13 , then dragged across upto F17
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Find a number that matches the most significant digits and provide row / column result

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

  7. #7
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Find a number that matches the most significant digits and provide row / column result

    I have to apologize to all of you. I have been on the road and have limited Internet access. I will be able to evaluated your responses next week.

  8. #8
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: Find a number that matches the most significant digits and provide row / column result

    Or you can try
    Please Login or Register  to view this content.
    (Finish by pressing ENTER)

    Please Login or Register  to view this content.
    (Finish by pressing CTRL SHIFT ENTER)

    Then copied down.
    Last edited by congnt92; 08-29-2018 at 12:19 PM. Reason: change {3,4,5,6} to row(3:6)

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find a number that matches the most significant digits and provide row / column result

    If you make all the codes the same length, then detabulate and sort, a simple lookup will do:

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Codes
    Codes
    Codes
    Codes
    Type
    Mult
    Code
    Type
    Mult
    2
    123
    23587
    457802
    789543
    A
    2.00
    123000
    A
    2.00
    3
    456789
    895
    B
    2.75
    128000
    C
    3.50
    4
    35846
    587
    128
    215478
    C
    3.50
    130000
    D
    4.25
    5
    35848
    589
    130
    215480
    D
    4.25
    132000
    E
    5.00
    6
    358501
    591
    132
    215482
    E
    5.00
    134000
    F
    5.75
    7
    35852
    134
    215484
    F
    5.75
    136000
    G
    6.50
    8
    35854
    595
    136
    215486
    G
    6.50
    138000
    H
    7.25
    9
    35856
    597
    138
    215488
    H
    7.25
    215478
    C
    3.50
    10
    215480
    D
    4.25
    11
    215482
    E
    5.00
    12
    Value
    Code
    Type
    Mult
    215484
    F
    5.75
    13
    591548
    591000
    E
    5.00
    B13: =LOOKUP(A13, $H$2:$H$30)
    215486
    G
    6.50
    14
    358465
    358460
    C
    3.50
    C13: =LOOKUP($A13, $H$2:$H$30, I$2:I$30)
    215488
    H
    7.25
    15
    123456
    123000
    A
    2.00
    235870
    A
    2.00
    16
    138564
    138000
    H
    7.25
    358460
    C
    3.50
    17
    358480
    D
    4.25
    18
    358501
    E
    5.00
    19
    358520
    F
    5.75
    20
    358540
    G
    6.50
    21
    358560
    H
    7.25
    22
    456789
    B
    2.75
    23
    457802
    A
    2.00
    24
    587000
    C
    3.50
    25
    589000
    D
    4.25
    26
    591000
    E
    5.00
    27
    595000
    G
    6.50
    28
    597000
    H
    7.25
    29
    789543
    A
    2.00
    30
    895000
    B
    2.75
    Last edited by shg; 08-29-2018 at 12:39 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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] Find all matches 3 digits and jump to each line
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-01-2016, 02:02 PM
  2. Replies: 6
    Last Post: 04-05-2016, 03:03 PM
  3. Excel 2007 forumla result incorreclty adds significant digits
    By ggamble in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-17-2014, 07:16 PM
  4. Replies: 11
    Last Post: 10-11-2013, 08:02 AM
  5. msgbox for negative answer and how to determine the number of significant digits
    By bmr8002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2012, 08:56 PM
  6. Specific number of significant digits
    By Bjornar in forum Excel General
    Replies: 9
    Last Post: 11-04-2007, 12:58 PM
  7. maximum number size/significant digits
    By noel in forum Excel General
    Replies: 4
    Last Post: 02-20-2006, 11:45 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