+ Reply to Thread
Results 1 to 4 of 4

Need SecondSearch base on Header with 1st Search to match row

  1. #1
    Registered User
    Join Date
    07-19-2022
    Location
    Hong Kong
    MS-Off Ver
    365
    Posts
    28

    Red face Need SecondSearch base on Header with 1st Search to match row

    Here is 2 worksheets, Source and Result

    Source was directly cut the XML/JSON on dynamic tag order.
    Expected result will be first MATCH Column A (the Key, 0), get the row#, example is 4.
    need second search base on SOURCE!$4:$4 from above result, find the Header h3 in somehow Column
    Maybe 2, 4, 6 or NOT exist.
    Take the next field if found h3

    The attachment is just 4 rows as sample case.

    Thank you for your support.

    p.s. As company privacy, I am NOT allow to use any online tool to convert the xml.
    Attached Files Attached Files
    Last edited by nojoke1105; 07-19-2022 at 12:55 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Need SecondSearch base on Header with 1st Search to match row

    Try

    =SUMPRODUCT((Source!$C$1:$G$4),(Source!$A$1:$A$4=$A2)*(Source!$B$1:$F$4=B$1))

    custom format as

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

  3. #3
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Need SecondSearch base on Header with 1st Search to match row

    A different approach...

    =IFERROR(INDEX(INDEX(Source!$C$1:$G$4,MATCH($A2,Source!$A$1:$A$4,0),0),MATCH(B$1,INDEX(Source!$B$1:$F$4,MATCH($A2,Source!$A$1:$A$4,0),0),0)),"")

  4. #4
    Registered User
    Join Date
    07-19-2022
    Location
    Hong Kong
    MS-Off Ver
    365
    Posts
    28

    Re: Need SecondSearch base on Header with 1st Search to match row

    Thank you, Nick Williams.
    Of cos, the real case the taken next Column may be non-digit.
    Sorry, I just misleading for giving only number to take.

    This formula is wonderful, it can help to resolve any XML/JSON without using tools.

    For example, use notepad replace:
    <h3>hello</h3>
    <h5>785</h5>
    ...
    =>
    <h3>hello</h3>●<h5>785</h5>● ...

    for import delimited●, then easier cut to Source sheet style,
    Everything will be alright.

+ 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] Search nearest value above in table. return header row + header column
    By 323428 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2018, 05:06 AM
  2. [SOLVED] Using Column Header name to define Index/Match search ranges
    By Jimbo42 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2017, 06:56 PM
  3. VBA to Search Row Header and perform calculation on header values
    By adil.master in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2017, 07:44 AM
  4. Search for exact match column header
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2014, 01:21 PM
  5. Replies: 1
    Last Post: 02-20-2014, 12:24 PM
  6. search header name and match data in row and hight light unmatch data in colour
    By shrinivasmj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 07:22 AM

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