Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2011, 06:57 AM
beb1227 beb1227 is offline Drop Down List Question Windows XP Drop Down List Question Office 2007
Novice
Drop Down List Question
 
Join Date: May 2011
Posts: 18
beb1227 is on a distinguished road
Default Drop Down List Question

I have a form that has a section at the top were I have a section that shows a contact name in one cell...and then has the contact phone number in another cell.



then it also has a requestor name in a cell and a requestor phone number in a cell.


I wanted to create lists for both the contact names...and requestor names....followed by their phone number. so I could pull the names.

I am able to create the drop down from a range.....but I was wondering if anyone might now of a way or the formula would be used to get the corresponding phone number.

on sheet #2 I would have the table for the info to pull.

column A Column B
1 name 1 number 1
2 name 2 number 2
3 name 3 number 3


I was thinking that in the cell that the phone number would be listed....a formula could be entered that would say something along the lines of

If the (cell with contact name) = Name 1 then enter number 1


Any thoughts on how to do this formula
Reply With Quote
  #2  
Old 11-23-2011, 09:17 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Drop Down List Question Windows XP Drop Down List Question Office 2003
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

I don't understand your layout very well but if your table is in, say A2:B10 on sheet 2 you can fetch the number using VLOOKUP like
Code:
=vlookup(A1,Sheet2!$A$2:$B$10,2,false)
Reply With Quote
  #3  
Old 11-23-2011, 09:44 AM
beb1227 beb1227 is offline Drop Down List Question Windows XP Drop Down List Question Office 2007
Novice
Drop Down List Question
 
Join Date: May 2011
Posts: 18
beb1227 is on a distinguished road
Default

I am very inexperienced with v look up...but that might work.


basically on Sheet 1 I am going to have a cell that will pull a contact name......from sheet two. and plug it into D6 on Sheet 1

The Name list on sheet to is in column A (1 to whatever)

The Number List is on Sheet 2 in Column B (1 to whatever).....each number should go to the name on that row.....so the name on A1 goes to the number on B1....and so on

So once I select a name to be plugged into D6....I want to have the matching phone number pull to cell H6 on sheet one.


Can you write the correct V look up for that?......and the other question or issue is, that the info on sheet 2 is a list.....and I want D6 to basically just go and find the phone number on sheet 2 and plug it in based on the name that is put in D6

Thanks
Reply With Quote
  #4  
Old 11-23-2011, 12:34 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Drop Down List Question Windows XP Drop Down List Question Office 2003
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Please attach a sample sheet - Thx
Reply With Quote
  #5  
Old 12-08-2011, 09:11 AM
beb1227 beb1227 is offline Drop Down List Question Windows XP Drop Down List Question Office 2007
Novice
Drop Down List Question
 
Join Date: May 2011
Posts: 18
beb1227 is on a distinguished road
Question

I was able to set my sheet up to do what I was wanting with the following Lookup Formula.

=LOOKUP(D4,FMs!A:A,FMs!B:B)


I am having one small glitch though, and wondered if anyone might now how to fix it.


D4 is my cell that provides the information to be looked up. If a name is typed into D4 that can be found in A:A....it provides the correct number for this contact.

the problem is that if a name is typed in that does not match "exactly" to a name listed in A:A....I am still getting a number pulled, and pretty random.

Is there a way to correct this formula.....so that if the data typed in D4 does not match exactly what is in A:A, it will just return an error or some other message ????
Reply With Quote
  #6  
Old 12-08-2011, 10:34 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Drop Down List Question Windows XP Drop Down List Question Office 2003
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

The values in lookup_vector ( in your case A:A) must be placed in ascending order: ...,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP might not return the correct value. Uppercase and lowercase text are equivalent.

Last edited by Pecoflyer; 12-08-2011 at 10:36 AM. Reason: Typo in col ref
Reply With Quote
  #7  
Old 12-08-2011, 07:26 PM
macropod's Avatar
macropod macropod is offline Drop Down List Question Windows 7 64bit Drop Down List Question Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If the values aren't sorted, and INDEX/MATCH combination can be used. As previously requested, a copy of the workbook to work with would be helpful, though.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Down List Question Drop Down List using SYMBOLS sm5948 Word 2 09-28-2011 05:05 AM
Drop Down List Question How to unlock Drop-Down list ilkks Word 4 05-06-2011 12:19 AM
Create Drop Down List Box hbradshaw Word VBA 0 09-27-2010 06:24 AM
Drop Down List and Functions (Linking) sten Excel 0 03-17-2010 03:03 PM
Long List for drop down box DLo99 Word 0 02-28-2010 08:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft