Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill a cell with abbreviated text from a list

I need code to do the following:

When the user mouse clicks a specified cell on the worksheet, say
Sheet1!A1, I want a list to appear, like a Combo Box, that shows
options from a field, Sheet2!A1:A50 it will be a long list and a
scroll bar will be needed).

When the user selects from that list, the cell (Sheet1!A1) should be
populated from the corresponding row in Sheet2!B1:B50, which contains
abbreviations of the descriptions in Sheet2!A1:A50.

I don't want to use a combo box as the cells where the data is entered
are two small and too close together (which is why they are populated
with abbreviations).

I also want to be able to copy Sheet1!A1 into several places (Case1,
Case2, Case3, etc.) and have the code continue to populate the cell
that is clicked on, not the original.

Finally, I would prefer if only a mouse click initializes the code,
not scrolling into the cell. Alternately, the list could appear on any
change to the cell. The point being that I want to be able to scroll
into the cell without bringing up the list.

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Fill a cell with abbreviated text from a list

I'd think a validation list would work in this sense. You could create a
named range on Sheet2 containing the data you'd need. It would have to be a
workbook level named range and not specific to the worksheet. Then in the
cell in question, you could set up the validation and reference the list on
sheet1.

Am I missing something?
--
HTH,
Barb Reinhardt



"BobT" wrote:

I need code to do the following:

When the user mouse clicks a specified cell on the worksheet, say
Sheet1!A1, I want a list to appear, like a Combo Box, that shows
options from a field, Sheet2!A1:A50 it will be a long list and a
scroll bar will be needed).

When the user selects from that list, the cell (Sheet1!A1) should be
populated from the corresponding row in Sheet2!B1:B50, which contains
abbreviations of the descriptions in Sheet2!A1:A50.

I don't want to use a combo box as the cells where the data is entered
are two small and too close together (which is why they are populated
with abbreviations).

I also want to be able to copy Sheet1!A1 into several places (Case1,
Case2, Case3, etc.) and have the code continue to populate the cell
that is clicked on, not the original.

Finally, I would prefer if only a mouse click initializes the code,
not scrolling into the cell. Alternately, the list could appear on any
change to the cell. The point being that I want to be able to scroll
into the cell without bringing up the list.

Thanks for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Fill a cell with abbreviated text from a list

I guess I answered part of your question.

Once you've populated Sheet1!A1, you could maybe use a WOrksheet_Selection
change event. I'm not exactly sure what you want to do at this point, so
can't give a meaningful example.
--
HTH,
Barb Reinhardt



"BobT" wrote:

I need code to do the following:

When the user mouse clicks a specified cell on the worksheet, say
Sheet1!A1, I want a list to appear, like a Combo Box, that shows
options from a field, Sheet2!A1:A50 it will be a long list and a
scroll bar will be needed).

When the user selects from that list, the cell (Sheet1!A1) should be
populated from the corresponding row in Sheet2!B1:B50, which contains
abbreviations of the descriptions in Sheet2!A1:A50.

I don't want to use a combo box as the cells where the data is entered
are two small and too close together (which is why they are populated
with abbreviations).

I also want to be able to copy Sheet1!A1 into several places (Case1,
Case2, Case3, etc.) and have the code continue to populate the cell
that is clicked on, not the original.

Finally, I would prefer if only a mouse click initializes the code,
not scrolling into the cell. Alternately, the list could appear on any
change to the cell. The point being that I want to be able to scroll
into the cell without bringing up the list.

Thanks for any help.

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
remove fill in text from a cell from an unpopulated fill-in cell Deb[_3_] Excel Worksheet Functions 1 September 22nd 09 03:28 PM
Extracting abbreviated days, converting to full word Sneilan Excel Discussion (Misc queries) 4 October 19th 07 04:02 PM
using a list box to fill text boxes Jim T.[_2_] Excel Programming 3 November 28th 06 02:31 AM
How to auto-fill text based on text in another cell Jason Excel Discussion (Misc queries) 3 February 16th 05 08:40 PM
HOW CAN I AUTO FILL A CELL WITH TEXT FROM ANOTHER WORKSHEET TEXT . waz Excel Worksheet Functions 2 December 29th 04 07:49 PM


All times are GMT +1. The time now is 04:22 PM.

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

About Us

"It's about Microsoft Excel"