+ Reply to Thread
Results 1 to 9 of 9

Formula To Match Excel Data to Appropriate Node

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    43

    Formula To Match Excel Data to Appropriate Node

    I need to match the attached data so code 1 along with its data matches code 2. The excel sheet is attached. I do not not know how to do this.

    All help is greatly appreciated, I have been stuck on this problem for a couple of weeks now.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Formula To Match Excel Data to Appropriate Node

    Not sure what is your expected result and which is your source data

    Please give some brief about your data for my better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    11-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    43

    Re: Formula To Match Excel Data to Appropriate Node

    I thought the expected result is trivial, but Ill explain anyway. I need code1 to match code2 without losing its attachment to code0.

  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,944

    Re: Formula To Match Excel Data to Appropriate Node

    Sorry, I dont understand what you want either

    I need to match the attached data so code 1 along with its data matches code 2.
    What is code 1's data? Keep in mind, this is blatantly obvious to you, but we really have no idea what you are working with

    Perhaps you samples of what your expected outcome would look like.
    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

  5. #5
    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: Formula To Match Excel Data to Appropriate Node

    If you move col B one column left, there's a worbook at https://app.box.com/shared/elrnbidnr7 that will do this:

    Row\Col
    A
    B
    C
    1
    Code2
    Code
    Code1
    2
    0000001391689 HST
    3
    0000004655215 HST 0000004655215
    4
    0000007745443 HST 0000007745443
    5
    0012511446529 NT
    6
    0018787772324 HST
    7
    0018787781050 HST
    8
    0018787783054 HST
    9
    0018787784051 HST
    10
    0018787785058 HST
    11
    0018787786055 HST
    12
    0018787787052 HST
    13
    0018787788059 HST
    14
    0024182000207 NT
    15
    0024182002126 NT
    16
    0024182002188 NT
    17
    0024182003505 NT
    18
    0024182003512 NT
    19
    0024182003529 NT
    20
    0024182003536 NT
    21
    0024182003543 HST
    22
    0024182003550 NT
    23
    0024182003567 NT
    24
    0024182003581 NT
    25
    0024182003598 NT
    26
    0024182003604 NT
    27
    0024182003628 NT
    28
    0024182003864 NT
    29
    0024182013160 NT
    30
    0024182023527 NT
    31
    0024182023565 NT
    32
    0024182031515 NT
    33
    0024182031522 NT
    34
    0024182151695 NT
    35
    0024182300130 NT
    36
    0024182425901 NT
    37
    0024182493153 NT
    38
    0026395000043 HST
    39
    0026395000128 HST
    40
    0032917101815 NT
    41
    0032917101853 HST
    42
    0032917101877 NT
    43
    0033674105009 HST 0033674105009
    44
    0033674112007 HST
    45
    0033674135006 HST
    46
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    11-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    43

    Re: Formula To Match Excel Data to Appropriate Node

    Quote Originally Posted by shg View Post
    If you move col B one column left, there's a worbook at https://app.box.com/shared/elrnbidnr7 that will do this:

    Row\Col
    A
    B
    C
    1
    Code2
    Code
    Code1
    2
    0000001391689 HST
    3
    0000004655215 HST 0000004655215
    4
    0000007745443 HST 0000007745443
    5
    0012511446529 NT
    6
    0018787772324 HST
    7
    0018787781050 HST
    8
    0018787783054 HST
    9
    0018787784051 HST
    10
    0018787785058 HST
    11
    0018787786055 HST
    12
    0018787787052 HST
    13
    0018787788059 HST
    14
    0024182000207 NT
    15
    0024182002126 NT
    16
    0024182002188 NT
    17
    0024182003505 NT
    18
    0024182003512 NT
    19
    0024182003529 NT
    20
    0024182003536 NT
    21
    0024182003543 HST
    22
    0024182003550 NT
    23
    0024182003567 NT
    24
    0024182003581 NT
    25
    0024182003598 NT
    26
    0024182003604 NT
    27
    0024182003628 NT
    28
    0024182003864 NT
    29
    0024182013160 NT
    30
    0024182023527 NT
    31
    0024182023565 NT
    32
    0024182031515 NT
    33
    0024182031522 NT
    34
    0024182151695 NT
    35
    0024182300130 NT
    36
    0024182425901 NT
    37
    0024182493153 NT
    38
    0026395000043 HST
    39
    0026395000128 HST
    40
    0032917101815 NT
    41
    0032917101853 HST
    42
    0032917101877 NT
    43
    0033674105009 HST 0033674105009
    44
    0033674112007 HST
    45
    0033674135006 HST
    46
    This is exactly what I need, I'm having trouble using the workbook though. I moved code 2 to column A and defined it as a keys, when I press Alt f8 and run AlignKeys, I get error "All cells of named range "keys" must be in the same row."

  7. #7
    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: Formula To Match Excel Data to Appropriate Node

    In the example I posted, I selected A1 and C1, and entered Keys in the Names box (left of the formula bar). Then I ran the macro.

  8. #8
    Registered User
    Join Date
    11-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    43

    Re: Formula To Match Excel Data to Appropriate Node

    Quote Originally Posted by shg View Post
    In the example I posted, I selected A1 and C1, and entered Keys in the Names box (left of the formula bar). Then I ran the macro.
    I ran the macro, but the problem still persists as the macro does not match items with leading zero's. For example: I have 063151250199 & 0063151250199 these are considered as the same, so I need them matched.

  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: Formula To Match Excel Data to Appropriate Node

    But they aren't the same. Numbers with leading zeros are strings, and strings are compared character by character. If leading zeros are not significant, convert them to numbers, so they disappear.

+ 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] Excel bug? Excel calculated Polynomial formula does not match data, why?
    By Doug_mkk in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 02-13-2020, 11:36 AM
  2. Read and compare node value
    By rpundlik in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-06-2014, 03:01 AM
  3. excel formula for Match 2 columns data
    By luke_devon in forum Excel General
    Replies: 7
    Last Post: 10-12-2010, 09:59 AM
  4. Excel formula to find and match the data
    By SmallJack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2010, 05:13 AM
  5. [SOLVED] delete a node in treeview
    By mark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2005, 12:06 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