Excel, vlookup

How can I produce the following vlookup?

jack      123
joe      456
james      789

jack / joe / james:      123 / 456 / 789
Who is Participating?
newparadigmzConnect With a Mentor Author Commented:
wanted to do it with a single formula, but just chopped it down and did it manually, thanks
Not exactly sure what you're asking, but...
if your data is in columns A and B:

=VLOOKUP("jack", A:B, 2, false)
will give you 123

=VLOOKUP("joe", A:B, 2, false)
will give you 456

=VLOOKUP("james", A:B, 2, false)
will give you 789
newparadigmzAuthor Commented:
the number of names and /'s are unknown, need a formula that will work for that, and produce a 1 string result.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Without going into macros, Excel doesn't really support any kind of "looping" function other than things like SUM.

In your case, you may want to add a new formula to column C and D like this:
C1 =A1, D1 =B1
C2 =C1&" / " & A2, D2 =D1 & " / " & B2
copy the above formula down to the last row of names and you should have your results

To complete if you may want to put this in column E:
=C1 & ": " & D1
and copy it down.
Would you like a specific VBA solution creating to provide the functionality you require?
It would not be too hard to provide the required result using code, but not all people like to have code in their workbooks.

I offered a simple formula, but it had to be applied to several functions.  Did you try it? It would have saved you all that time you took to do it manually.
newparadigmzAuthor Commented:
no solution
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.