Find matching number for the result

bdtran

New Member
Hello All,

I encountered a situation that I need your help with a formula to get the result as shown “result” range row J1:X1.

The calculation based on weekly updated table on the left. If found a MATCH number from the “numberID” row J2:X2 in the Category row “A, B, L1A, L2UA, and T” , then the result is combined the Category name in B column with the “Range#” number.

For example in the table below:
The result found in "J1" based on numberID “1” in "J2". If found "1" matching on the left table as in "G3", then result is A5 by combining Category “A” with Range# 5.

If multiple matching results found, then concatenated the result separating by period for each matching number as shown in "O1".

Thank you all for the help.
BDT



ABCDEFGHIJKLMNOPQRSTUVWX
1Range#>R12345Result>A5B1.L2UA1A2.L1A1T5A3.T2A4.L1A5.T3A1B5.L1A3.T4L2UA3B3.L1A4L1A2.L2UA5.T1L2UA4B4B2.L2UA2
2numberID> 123456789101112131415
3Category>A73561
4Category>B21510138
5Category>L1A3118106
6Category>L2UA21591211
7Category>T115684

<colgroup><col><col><col><col span="5"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 

Eric W

MrExcel MVP
If you have Excel 365 with the TEXTJOIN function, put this formula in J1:

=TEXTJOIN(".",TRUE,IF($C$3:$G$7=J2,$B$3:$B$7&$C$1:$G$1,""))

and confirm it by pressing Control+Shift+Enter, not just Enter. Then drag it to the right. If you don't have that, then you'll need some flavor of VBA. For example, if you go to post 6 in this thread:

https://www.mrexcel.com/forum/excel-questions/1078497-excel-formula-if-then-maybe.html

I present a UDF that mimics TEXTJOIN and you can use that.
 
Last edited:

bdtran

New Member
Eric,

Just got a chance to test your formula with the Excel 365. It worked perfectly with the expected results.

I really appreciate your help with this formula.

BDT
 

Some videos you may like

This Week's Hot Topics

  • Get External Data (long shot question!)
    This is likely a long shot but I am wondering if it is at all possible for Excel to somehow 'change' the contents of a URL that is being linked to...
  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • Cell Formatting
    Good Morning, I need to format a few different cells in the following manners: A1 has to always add a colon (:) after whatever is typed in by a...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • Workbook_Change stopped working !
    I am working on an app to speed up & automate processing of Credit Cards statements. After data is input from a CSV file, it is presented to the...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
Top