+ Reply to Thread
Results 1 to 4 of 4

Data-Entry shortcut

  1. #1
    Forum Contributor
    Join Date
    01-09-2009
    Location
    Cedar Hill, Tx
    MS-Off Ver
    Excel 2003
    Posts
    200

    Data-Entry shortcut

    Howdy, folks:

    I'm trying to make a macro that will help with data-entry. In two columns of each sheet (columns D and J), I'm entering school grade information ("K", "Pre-K", "1", etc, up to "12"). As I move off of each cell with data so-entered, I want to have the entry formated such that "1", becomes "1st", "12" becomes "12th", etc. I've put code into "Worksheet_SelectionChange" and the code works but...

    1. The cell value is not changed upon leaving the cell, only after re-entering the cell. So, I type "1" in the cell, move on (the cell value remaining as "1"), then go back to that cell and the value becomes "1st" like I want. So each cell requires entry and then (for example), left arrow, then right arrow, then move on the next cell for data-entry. Since I'm only saving a few keystrokes for each cell, this approach is just about a wash. I need to have the data changed upon leaving the cell. Is there a way?

    2. There are 50 or 60 sheets in the workBook and I have to copy that code onto each sheet. Is there a way to move it to the workBook level? Failing that, is there a way to ease the process of pasting that code to each of the sheets?

    TIA, folks.

    Bob
    Last edited by bstubbs; 09-20-2009 at 12:17 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Data-Entry shortcut

    try
    Please Login or Register  to view this content.
    instead
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Data-Entry shortcut

    There's a similar event in the WorkBook events that will allow this to happen on each sheet
    Please Login or Register  to view this content.
    Copy the code
    Select the workbook in which you want to store the code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
    Right-click on the ThisWorkbook object, and choose View Code
    Where the cursor is flashing, choose Edit | Paste
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Data-Entry shortcut

    Your post does not comply with Rule 10 of our Forum RULES. Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1