Formula to match 5-digit numbers in Column A and M, add name/text in Column I to Column B

mr_ITtoyou

New Member
Joined
Mar 26, 2021
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
How would I do a formula that would match the numbers in column A and H, when they match, then add the name/text from column I to column B, if any text?
I have over a 1,500 numbers on the list and I'm running the numbers from different phone system and pulling the numbers and names.

Book4
ABCDEFGHI
1NumberNameNumber from systemNames in system
22470024700
32470124701PAGNET, PAGING #1
42470224702
524703247032, SOUTH MAIN NURSE STA.
62470424704Phone Rm Test Phone
72470524705LABORTORY MENU 24705
82470624706DIETARY, FAX
92470724707FINANCE
102470824708NEURO, DIAGNOSIS FAX
112470924709LAB 1100 Building Fax
122471024710
132471124711MED. REC. BSMNT FAX
142471224713
152471324714KARL, VAN ALLEN
162471424715
172471524716SYNERGY
182471624717NICU, FRONT OFFICE
192471724718ED Lobby Frnt. Dsk. fax
202471824719
212471924720Vineyard TW. Bed Contrl Fax
222472024721HR MAIN MENU
232472124722
242472224723
252472324724ICU, FAX
262472424725OPEN, HEART SURGERY
272472524726
282472624727SURGERY, FAX
292472724728MATERNITY, FAX
302472824729
312472924730BUS., OFFICE FAX ADMITTING
322473024731ED MAIN FAX
332473124733ACU, FAX
342473224734
352473324735CSDU, FAX
3624734
3724735
38
Sheet1
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try:

varios 17nov2023.xlsm
ABCDEFGHI
1NumberNameNumber from systemNames in system
224700 24700
324701PAGNET, PAGING #124701PAGNET, PAGING #1
424702 24702
5247032, SOUTH MAIN NURSE STA.247032, SOUTH MAIN NURSE STA.
624704Phone Rm Test Phone24704Phone Rm Test Phone
724705LABORTORY MENU 2470524705LABORTORY MENU 24705
824706DIETARY, FAX24706DIETARY, FAX
924707FINANCE24707FINANCE
1024708NEURO, DIAGNOSIS FAX24708NEURO, DIAGNOSIS FAX
1124709LAB 1100 Building Fax24709LAB 1100 Building Fax
1224710 24710
1324711MED. REC. BSMNT FAX24711MED. REC. BSMNT FAX
1424712 24713
1524713 24714KARL, VAN ALLEN
1624714KARL, VAN ALLEN24715
1724715 24716SYNERGY
1824716SYNERGY24717NICU, FRONT OFFICE
1924717NICU, FRONT OFFICE24718ED Lobby Frnt. Dsk. fax
2024718ED Lobby Frnt. Dsk. fax24719
2124719 24720Vineyard TW. Bed Contrl Fax
2224720Vineyard TW. Bed Contrl Fax24721HR MAIN MENU
2324721HR MAIN MENU24722
2424722 24723
2524723 24724ICU, FAX
2624724ICU, FAX24725OPEN, HEART SURGERY
2724725OPEN, HEART SURGERY24726
2824726 24727SURGERY, FAX
2924727SURGERY, FAX24728MATERNITY, FAX
3024728MATERNITY, FAX24729
3124729 24730BUS., OFFICE FAX ADMITTING
3224730BUS., OFFICE FAX ADMITTING24731ED MAIN FAX
3324731ED MAIN FAX24733ACU, FAX
3424732 24734
3524733ACU, FAX24735CSDU, FAX
3624734 
3724735CSDU, FAX
Hoja4
Cell Formulas
RangeFormula
B2:B37B2=IFERROR(IF(VLOOKUP(A2,H:I,2,0)="","",VLOOKUP(A2,H:I,2,0)),"")
 
Upvote 0
.. or possibly this shortened version.

23 11 18.xlsm
ABHI
1NumberNameNumber from systemNames in system
224700 24700
324701PAGNET, PAGING #124701PAGNET, PAGING #1
424702 24702
5247032, SOUTH MAIN NURSE STA.247032, SOUTH MAIN NURSE STA.
624704Phone Rm Test Phone24704Phone Rm Test Phone
724705LABORTORY MENU 2470524705LABORTORY MENU 24705
824706DIETARY, FAX24706DIETARY, FAX
924707FINANCE24707FINANCE
1024708NEURO, DIAGNOSIS FAX24708NEURO, DIAGNOSIS FAX
1124709LAB 1100 Building Fax24709LAB 1100 Building Fax
1224710 24710
1324711MED. REC. BSMNT FAX24711MED. REC. BSMNT FAX
1424712 24713
1524713 24714KARL, VAN ALLEN
1624714KARL, VAN ALLEN24715
1724715 24716SYNERGY
1824716SYNERGY24717NICU, FRONT OFFICE
1924717NICU, FRONT OFFICE24718ED Lobby Frnt. Dsk. fax
2024718ED Lobby Frnt. Dsk. fax24719
2124719 24720Vineyard TW. Bed Contrl Fax
2224720Vineyard TW. Bed Contrl Fax24721HR MAIN MENU
2324721HR MAIN MENU24722
2424722 24723
2524723 24724ICU, FAX
2624724ICU, FAX24725OPEN, HEART SURGERY
2724725OPEN, HEART SURGERY24726
2824726 24727SURGERY, FAX
2924727SURGERY, FAX24728MATERNITY, FAX
3024728MATERNITY, FAX24729
3124729 24730BUS., OFFICE FAX ADMITTING
3224730BUS., OFFICE FAX ADMITTING24731ED MAIN FAX
3324731ED MAIN FAX24733ACU, FAX
3424732 24734
3524733ACU, FAX24735CSDU, FAX
3624734 
3724735CSDU, FAX
Lookup
Cell Formulas
RangeFormula
B2:B37B2=IFNA(VLOOKUP(A2,H:I,2,0)&"","")
 
Upvote 0
Thank you both Dente Amor and Peter_SSs, I appreciate your help on this. I'm not sure why the text is not showing up in column B. I checked the cell format, and made sure that the font color was not White. I placed the formula in B2, copied it down the column B, B3-=IFNA(VLOOKUP(A3,H:I,2,0)&"","") that has text in I3 put not showing in B3. What am I missing?

Book4
ABCDEFGHI
1NumberNameNumber from systemNames in system
224700 24700
324701 24701PAGNET, PAGING #1
424702 24702
524703 247032, SOUTH MAIN NURSE STA.
624704 24704Phone Rm Test Phone
724705 24705LABORTORY MENU 24705
824706 24706DIETARY, FAX
924707 24707FINANCE
1024708 24708NEURO, DIAGNOSIS FAX
1124709 24709LAB 1100 Building Fax
1224710 24710
1324711 24711MED. REC. BSMNT FAX
1424712 24713
1524713 24714KARL, VAN ALLEN
1624714 24715
1724715 24716SYNERGY
1824716 24717NICU, FRONT OFFICE
1924717 24718ED Lobby Frnt. Dsk. fax
2024718 24719
2124719 24720Vineyard TW. Bed Contrl Fax
2224720 24721HR MAIN MENU
2324721 24722
2424722 24723
2524723 24724ICU, FAX
2624724 24725OPEN, HEART SURGERY
2724725 24726
Sheet1
Cell Formulas
RangeFormula
B2:B27B2=IFNA(VLOOKUP(A2,H:I,2,0)&"","")
 
Upvote 0
I'm not sure why the text is not showing up in column B.
One possibility would be that column A is text and column H is numerical or vice-versa. What do these return if placed in vacant cells?
=ISNUMBER(A2)
=ISNUMBER(H2)
 
Upvote 0
One possibility would be that column A is text and column H is numerical or vice-versa. What do these return if placed in vacant cells?
=ISNUMBER(A2)
=ISNUMBER(H2)
Well Column A and Column H were formated different, A was General and H was Text, so I made them both General. The text still did not show so I opened a new Excel sheet and it worked in the new Excel sheet.
I added these in the sheet that did not show the text and I got
=ISNUMBER(A2) TRUE
=ISNUMBER(H2) FALSE
I'll start on a new Excel sheet, thanks for your help.
 
Upvote 0
No need to do that. With the original sheet, just change the formula in B2 to
Excel Formula:
=IFNA(VLOOKUP(A2&"",H:I,2,0)&"","")
That worked great. Thanks again. Have a great weekend.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top