Listbox Columns and Code

C

Craig Coope

Hi again,

I don't know if I can actually do this with a listbox but what I want is to
have a listbox wich displays 2 columns of info from my sheet, which it does,
however I want to add an instruction which will change what is displayed in
the list.

For example the list at present is something like this

Name1 0
Name2 1
Name3 2

I want to add an instruction which says something like "If textcolumn2(the
2nd column) = "0" then textcolumn2 = "Home"

Obviously the above code is not right but I hope you get what I want to do.

The 2nd column in my sheet will always display numbers (1-10) just not
always in that order but I want these numbers to be translated into words in
the listbox. 0 will always be "Home" and 1 will always be "Work" and so on.

If none of this is possible using VBA code in the listbox is it possible to
just type an instruction into an adjacent cell on my sheet to convert the
numbers into words? (which I can then just import already done into my
listbox).

Hope someone can help...

Craig...
 
C

Craig Coope

Just to clarify........
For example the list at present is something like this

Name1 0
Name2 1
Name3 2

I want to add an instruction which says something like "If textcolumn2(the
2nd column) = "0" then textcolumn2 = "Home"

Then the listbox would look like this

Name1 Home
Name2 Work

etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top