LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default multiple entries in the same column in a spreadsheet

What kind of a shortcut key are you looking for?

If you're looking for a single-keystroke solution, you could use a
worksheet event to assign these values to a key. Name the column
where the codes go CodeColumn, and paste the following code into its
VBA module:
-------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not (Intersect(Target, Me.Range("CodeColumn")) Is Nothing) _
And Target.Columns.Count = 1 And _
Target.Address < Target.EntireColumn.Address Then
Application.OnKey "1", "RF"
Application.OnKey "2", "RWW"
Application.OnKey "3", "RC_"
Application.OnKey "4", "CTUM_NV"
Else
Application.OnKey "1"
Application.OnKey "2"
Application.OnKey "3"
Application.OnKey "4"
End If
End Sub

Private Sub Worksheet_Deactivate()
Application.OnKey "1"
Application.OnKey "2"
Application.OnKey "3"
Application.OnKey "4"
End Sub


---------
For your example codes, in the order you have them listed, the keys
1-4 are bound to the codes. Now, paste this code in a standard
module:
--------


Public Sub RF()
Selection.Value = "RF"
End Sub

Public Sub RWW()
Selection.Value = "RWW"
End Sub

Public Sub RC_()
Selection.Value = "RC"
End Sub

Public Sub CTUM_NV()
Selection.Value = "CTUM-NV"
End Sub


--------
Notice there is an underscore after the RC procedure, this is because
Excel will not allow RC as a name of a procedure. Also note that CTUM-
NV the dash is replaced by an underscore, also for naming reasons.

Now, whenever you have cells selected in the codes column
(CodeColumn), the keys 1 through 4 will be assigned to put those codes
in all cells selected. This functionality is disabled on three
conditions: selection consists of more than one column, selection
includes the entire codes column, or sheet is deactivated.

This is tricky to work with because it might cause your keys to be
bound when you don't want them to. The easier way to do this is to
record a macro and assign a Ctrl+whatever key combination.

Hope that helps, post back with questions.




On Oct 30, 2:46 pm, Bailey9399
wrote:
I need to input the entries in one column - ex: RF , RWW, RC, CTUM-NV,
It depends on the disposition on what code goes into that cell. But, they
are the same ones all the time. Is there a way to set-up a shortcut keys for
these.

I do not want to use drop down boxes because this is a huge spreadsheet.

We do not have Access, which that would of been my choice.

Any help would be greatly appreciated.



 
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
Date and time stamping multiple cells for multiple entries. Gerald Excel Worksheet Functions 1 May 9th 06 01:45 PM
Populate a spreadsheet with multiple entries from a master jdall Excel Discussion (Misc queries) 1 April 6th 06 12:31 AM
Multiple entries in column Jeff Excel Worksheet Functions 0 February 23rd 06 03:49 PM
I cant make entries in my spreadsheet expense report Excel Discussion (Misc queries) 1 October 8th 05 06:03 PM
What is the max of entries in an Excel Spreadsheet? Ramon Soto Excel Discussion (Misc queries) 1 September 26th 05 03:46 PM


All times are GMT +1. The time now is 11:03 AM.

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"