Search vlookup more than 1 column

Bond00

Board Regular
Joined
Oct 11, 2017
Messages
142
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
So right now this function works and it searches another Doc filled with customer names in A2:A1500 range based off the partial value in C1
1728325955247.png

Excel Formula:
=IF(ISNUMBER(SEARCH("",VLOOKUP($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$A$2:$L$1500,COLUMNS($A$1:A1),0))),VLOOKUP($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$A$2:$L$1500,COLUMNS($A$1:A1),0),C1)
this formula is in C4 through C7 (i edited out the other cells) and reads the name from C1 as text to search

right now it searches another doc in col A but i'd like to also search col B2:B1500 and col C2:C1500 in that zCompany List.xlsx as well so it can pull data based on more options from the C1 cell

C1 pulls from somewhere else as well, so sometimes it gets a default value which is why i have it just default to C1 at the end if it doesn't find the searched name in the zCompany List doc, If i remember right i think the =IF(ISNUMBER is for that reason otherwise the C4-C7 cells become #N/A

So remember main goal, to change this formula so it can search A B or C col for data to pull in from the other doc (if it comes across a blank cell in those A-C columns just ignore)

thanks for any help!
 
yeah that seems to work good now. this is the layout i used. I need to leave in a sec but ill test it more thoroughly later and make 100% sure and ill post back and let you know.
Also i didnt press ctrl + shift enter to put that in, i didn't need to right?

Can i set that to Tool'!$A2:$A1500, and l'!$B2:$B1500,0) just so it doesn't reference the whole columns?

Book1
ABCDEFGHIJKLM
1Company NameShort SrchContact NameAddressCity, State ZipCountryN/A Phone FaxEmailTax ExemptLabor RateExtra
2Test company 1T1Name1 lname11001 place rdcity1, state1 zip1US1numb1fax1email1No0
3Test company 2T2Name2 lname21002 place rdcity2, state2 zip2US2numb2fax2email2No0
4Test company 3T3Name3 lname31003 place rdcity3, state3 zip3US3numb3fax3email3No0
5Test company 4T4Name4 lname41004 place rdcity4, state4 zip4US4numb4fax4email4No0
6Test company 5T5Name5 lname51005 place rdcity5, state5 zip5US5numb5fax5email5No0
7Test company 6T6Name6 lname61006 place rdcity6, state6 zip6US6numb6fax6email6No0
8Test company 7T7Name7 lname71007 place rdcity7, state7 zip7US7numb7fax7email7No0
9Test company 8T8Name8 lname81008 place rdcity8, state8 zip8US8numb8fax8email8No0
10Test company 9T9Name9 lname91009 place rdcity9, state9 zip9US9numb9fax9email9No0
11Test company 10T10Name10 lname101010 place rdcity10, state10 zip10US10numb10fax10email10No0
12Test company 11T11Name11 lname111011 place rdcity11, state11 zip11US11numb11fax11email11No0
13Test company 12T12Name12 lname121012 place rdcity12, state12 zip12US12numb12fax12email12No0
14Test company 13T13Name13 lname131013 place rdcity13, state13 zip13US13numb13fax13email13No0
15Test company 14T14Name14 lname141014 place rdcity14, state14 zip14US14numb14fax14email14No0
Sheet1
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Also i didnt press ctrl + shift enter to put that in, i didn't need to right?
In these formulas it is not necessary


Can i set that to Tool'!$A2:$A1500, and l'!$B2:$B1500,0) just so it doesn't reference the whole columns?
In these formulas it is not necessary, because they are standard formulas. But if you want to narrow it down, then start in row 1.


Excel Formula:
=IFERROR(INDEX('[zCompany List.xlsx]Contacts for Tool'!$A1:$A500,
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$A1:$A500,0),
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$B1:$B500,0),
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$C1:$C500,0),"")))),"Not found")

😇
 
Upvote 0
Solution
In these formulas it is not necessary


In these formulas it is not necessary, because they are standard formulas. But if you want to narrow it down, then start in row 1.


Excel Formula:
=IFERROR(INDEX('[zCompany List.xlsx]Contacts for Tool'!$A1:$A500,
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$A1:$A500,0),
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$B1:$B500,0),
IFERROR(MATCH($C$1&"*",'[zCompany List.xlsx]Contacts for Tool'!$C1:$C500,0),"")))),"Not found")

😇
When/what makes it necessary to use ctrl shift enter? only certain functions?

Also its best to narrow it down even if its a standard formula right? so it doesn't address millions of rows.

Also i tested it fully and it seems to work great now, thanks a lot for all the help. :)
 
Upvote 0
When/what makes it necessary to use ctrl shift enter? only certain functions?

An array formula is a type of formula that performs an operation on multiple values instead of a single value. The final result of an array formula can be either one item or an array of items, depending on how the formula is constructed.

To work correctly, array formulas need to be entered with control + shift + enter. When you enter with control + shift + enter, you'll see the formula wrapped in curly braces {} in the formula bar. Do not enter curly braces manually, or the formula won't work.

More info:

-----------------------
Also i tested it fully and it seems to work great now, thanks a lot for all the help

Im glad to help you. Thanks for the feedback.

Regards
Dante Amor
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
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