Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2013, 10:52 AM
Registered User
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Post Retrieve corresponding information from multiple tabs based on criteria in EXCEL

So I working on a project in Excel 2010, I have 3 tabs, one is in a form set up that a user enters info into, one is where the form information is stored, and 3rd has a company name list that populates a dropdown on the form tab and a column beside it that has matching companyID #'s.

What I need to do is when a user picks a company from the dropdown on the form tab, I need to be able to retrieve its corresponding companyID that is stored in the list tab

I need that corresponding companyID to be displayed on the storing tab, in the same row where all the other form info is retrieved to.

Does anyone know how id go about doing this? I've tried different functions but cant seem to get the right one. And if you suggest to use VBA, please tell me how.
 
Old August 23rd, 2013, 10:03 AM
Registered User
 
Join Date: Nov 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default excel lookup

if i understood correctly:

user selects say letter E from list.
that has a code number of 5 [5th letter in this example]

as you already have the letter E, just do a vlookup in the next cell using the source of the dropdown as your table. simple !

if you prefer vba then load both cols into dropdown and when selected paste
col1 and col2 into the storing tab.
i would tell you the exact syntax but cannot remember.
its something like
with listbox .selected
a = .item (0)
b = .item (1)
end with
then paste those variables (a and b) into the excel cells.
ie range("g14") = a [change the range to whatever cell you want]
post back if you need more info





Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve System information by VBA powerz Access VBA 8 August 13th, 2013 03:49 PM
Excel Counting or summing multiple criteria sonny50 Excel VBA 1 May 9th, 2011 10:34 PM
attach excel content to emails,based on criteria miracles Excel VBA 0 May 21st, 2007 09:45 PM
'Search Form' based on criteria Grafixx01 Access 7 May 4th, 2007 09:39 AM
Hide Tabs in a Form Based on a field. snoopy92211 Access VBA 1 November 18th, 2004 02:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.