View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gizmo63
 
Posts: n/a
Default Vlookup problem..

From your original post the constant part of the value will be "Hotel".
A3 is the cell I've used as containing the output from the dropdown (i.e.
"Hotel 3*"
From the suggested way of showing the star rating the 7th character will be
the number representing the 'stars'.
I've extracted the 7th character - mid(a3,7,1) and used this as the index
for the CHOOSE function. In the above example the 7th character is 3, so the
3rd CHOOSE option is used in the text join so the final expression will be
"Hotel ***"
If the index is greater than the number of options in the CHOOSE statement
it returns the last value, so my own habit is to add "ERROR" into most CHOOSE
statements to indicate an overflow. So should you end up (somehow?!?) with
"Hotel 6*" the final output would be "Hotel ERROR". If you need more help
with CHOOSE check out the Excel Help file.

With a little work you can make it more flexible so instead of just showing
"Hotel ***" you could use the actual hotel names.

hth

Giz

"Neo1" wrote:


Sorry I'm completely lost in the Choose what you did there...what do you
mean?

Thanks a lot
From John


--
Neo1
------------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329
View this thread: http://www.excelforum.com/showthread...hreadid=522635