Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

excel dropdown list selected vlookup to another value

I have a workbook with a couple tabs and one has drop down lists that connects to other tabs to prefill the dropdown list.

so on my main tab column B is a drop down which selects data from TAB(Territory) Column A.  When the user selects on of the drop downs I also want Column C of the current tab to be filled with the corresponding Column B from Territory.  Is there a built in or vlookup?
0
Matt Pinkston
Asked:
Matt Pinkston
  • 3
  • 3
1 Solution
 
Glenn RayExcel VBA DeveloperCommented:
Exactly...a VLOOKUP should suffice in this scenario.  If your data starts in row 2, insert this function in cell C2 and copy down:
=VLOOKUP(B2,Territory!B:B,1,FALSE)

Regards,
-Glenn
0
 
Matt PinkstonAuthor Commented:
it is not brining the value from Territory Column B across when Column A is a match
0
 
NBVCCommented:
Maybe:

=VLOOKUP(B2,Territory!A:B,2,FALSE)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Glenn RayExcel VBA DeveloperCommented:
My apologies... I was too quick to answer.  The formula should be:
=VLOOKUP(B2,Territory!A:B,2,FALSE)

Regards,
-Glenn
0
 
Matt PinkstonAuthor Commented:
in column C I am hoping to get column B from territory when current tab Column B = Territory Column A
0
 
Matt PinkstonAuthor Commented:
anyway to get rid of #N/A
0
 
Glenn RayExcel VBA DeveloperCommented:
Yep:
=IFERROR(VLOOKUP(B2,Territory!A:B,2,FALSE),"")

This returns a blank cell if it can't find the value.  If you want another message, change the "" to "not found" or similar.

-Glenn
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now