Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kylie
 
Posts: n/a
Default Search function using commas

I have created a list of names on a seperate worksheet and each has a unique
number

1 John Smith
2 Susan
3 Bill
etc

Then on different worksheets in a single cell I want to reference these
names.
So on one worksheet in a single cell I might want 1,3 (which would read as
John Smith, Bill).

Say I type "1,3" in cell B1. I have this in B2:
=INDEX(Sheet5!A:A,VALUE(LEFT(B1,SEARCH(",",B1)-1)))&" ,
"&INDEX(Sheet5!A:A,VALUE(MID(B1,SEARCH(",",B1)+1,1 00)))

This works fine. How do I then expand this function so I can reference more
than two names EG in Cell B1 put 1,3,4,6,7 etc

Thanks for your help
Kylie
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think this is going to be one unwieldy formula.

An alternative maybe to use:
tools|autocorrect options.

then when you type your numeric value, it'll be replaced as you type.

Another option would be to use a series of replaces.

Edit|Replace
what: 1
with: firstnameinlist
replace all

And string them together.

You could have a macro that did this based on that table on the other sheet.



Kylie wrote:

I have created a list of names on a seperate worksheet and each has a unique
number

1 John Smith
2 Susan
3 Bill
etc

Then on different worksheets in a single cell I want to reference these
names.
So on one worksheet in a single cell I might want 1,3 (which would read as
John Smith, Bill).

Say I type "1,3" in cell B1. I have this in B2:
=INDEX(Sheet5!A:A,VALUE(LEFT(B1,SEARCH(",",B1)-1)))&" ,
"&INDEX(Sheet5!A:A,VALUE(MID(B1,SEARCH(",",B1)+1,1 00)))

This works fine. How do I then expand this function so I can reference more
than two names EG in Cell B1 put 1,3,4,6,7 etc

Thanks for your help
Kylie


--

Dave Peterson
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
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
SEARCH function #VALUE! result Mike Boerne Excel Worksheet Functions 3 January 5th 05 08:53 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
HOW TO USE FIND OR SEARCH FUNCTION TO FILL DATA hsg Excel Worksheet Functions 2 November 18th 04 07:24 AM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 07:05 PM.

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

About Us

"It's about Microsoft Excel"