Variable string$

  • Thread starter Thread starter Ferdy
  • Start date Start date
F

Ferdy

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.
 
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
 
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
 
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
 
Back
Top