+ Reply to Thread
Results 1 to 5 of 5

macro to enter data in next blank cell

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    Kent
    MS-Off Ver
    Excel 2003
    Posts
    53

    macro to enter data in next blank cell

    Hi
    I would like to write a macro that will fill the next blank cell with data
    Example attached
    I want to enter the total in f5 into the next blank cell in g5 to r5 using a macro that will be activated by a button
    Any help would be appreciated
    Attached Files Attached Files
    Last edited by Karen311261; 10-20-2010 at 04:00 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: macro to enter data in next blank cell

    Hello Karen311261,

    The macro below will locate the first empty cell within the range of "G5:R5" and copy "F5" into it. If there are no empty cells then a message is displayed tell you this. The macro has been added to a button on Sheet1.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-26-2010
    Location
    Kent
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: macro to enter data in next blank cell

    Hi Leith
    This works a treat. I have added it to my worksheet, but I would like to be able to carry out the smae function on several rows of data. the rows are 28.46.54.66 and 73.
    Is there any easy way to adapt the code or could I create a new macro for each, but I would like to call them from the same button.
    Thanks for your help
    Kind Regards
    Karen

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: macro to enter data in next blank cell

    Hello Karen,

    here is the updated macro and workbook.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-26-2010
    Location
    Kent
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: macro to enter data in next blank cell

    Thank You very much for your help
    Works well
    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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