Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7
Default Variable string$

I am creating an excel file where I want to enter a number in a column which
will make a persons name appear in the next column, the numbers and names
having already being set up in a table. How would I set up the table and make
the name cell cross ref with the number in the previous cell.
I have defined number variables before but not text strings.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 897
Default Variable string$

If you had a list of numbers in column A, with the corresponding name
in column B, then you could use a VLOOKUP formula to return the name
for a given number. For example, if you had the following info
starting in A1:

Number | Name
1 John Smith
2 Jane Doe
3 John Doe
4 Mark Smith
5 Michael Doe


So if you wrote "3" in cell E1 and wanted to return the corresponding
name, this formula would do it:

=VLOOKUP(E1,A1:B6,2,FALSE)

--JP

On Nov 26, 7:22 am, Ferdy wrote:
I am creating an excel file where I want to enter a number in a column which
will make a persons name appear in the next column, the numbers and names
having already being set up in a table. How would I set up the table and make
the name cell cross ref with the number in the previous cell.
I have defined number variables before but not text strings.


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
Default Variable string$

Hi Fredy,
If I understand your issue, you have a table let's say
in column A you have numbers and in column B the names, the in column E you
want to enter a number and immediately to get the name populated in column F
So in column F enter this formula
=Vlookup(E1,A:B,2, False)
That will do the trick

"Ferdy" wrote:

I am creating an excel file where I want to enter a number in a column which
will make a persons name appear in the next column, the numbers and names
having already being set up in a table. How would I set up the table and make
the name cell cross ref with the number in the previous cell.
I have defined number variables before but not text strings.

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default Variable string$

Hi,

Assuming the number is in A1 enter the following formula in B1:

If the table is not sorted on the number column

=VLOOKUP(A1,G$1:H$7,2,)

Or shorter if it is sorted and every number you would enter in colum A is
listed

=VLOOKUP(A1,G$1:H$7,2)

or even shorter

=LOOKUP(A1,G$1:H$7)

Cheers,
Shane Devenshire





"Ferdy" wrote:

I am creating an excel file where I want to enter a number in a column which
will make a persons name appear in the next column, the numbers and names
having already being set up in a table. How would I set up the table and make
the name cell cross ref with the number in the previous cell.
I have defined number variables before but not text strings.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use a string as a Variable Name Brandt Excel Worksheet Functions 4 November 28th 07 06:01 PM
Nested String Filename Variable ed9213 Excel Worksheet Functions 9 February 12th 07 02:27 AM
find a variable text string [email protected] Excel Discussion (Misc queries) 2 January 30th 07 07:20 PM
calling variable within string [email protected] Excel Worksheet Functions 8 May 4th 06 03:07 PM
Variable in string DevinC Excel Discussion (Misc queries) 5 January 26th 06 08:59 PM


All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"