+ Reply to Thread
Results 1 to 5 of 5

Find the next blank cell in another worksheet

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Find the next blank cell in another worksheet

    I am trying to copy and past data into the next blank cell in another worksheet in the same workbook. I currently have this macro which works if I want to find the next empty cell and past data in the current worksheet. If I try to use it to paste data into another worksheet it just highlights the line Cells(6, Range("A6").End(xlToRight).Column + 1).Select and says there is an error.



    Sub
    Range("B96:B122").Select
    Selection.Copy
    Cells(6, Range("A6").End(xlToRight).Column + 1).Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
    xlNone, SkipBlanks:=False, Transpose:=False
    End Sub

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find the next blank cell in another worksheet

    Hi Tig..

    Working fine in my case..

    Just added a single line..

    Please Login or Register  to view this content.

    BTW.. You are still in <10 post.. you have still 6 chances to write code without CODE tag..


    Please spend some time to read forum rules.. and requesting you to add [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags for the code section.. like above..

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Registered User
    Join Date
    11-26-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find the next blank cell in another worksheet

    Hi DEC2HEX(3563),

    I'm new to this forum and do need to read the rules, and Vba.

    You say you've added a line the code I posted but I can't see what it is.

    Regards

    Tig

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find the next blank cell in another worksheet

    Hi Tig,

    Every Subroutine required a valid name to proceed..

    Your code in #1, dont have Routine Name.. I just added a Routine Name tig()

    Please re-check... and confirm..

  5. #5
    Registered User
    Join Date
    11-26-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find the next blank cell in another worksheet

    Hi,

    If you use this code it will copy data in a worksheet, find the next blank cell in row 6 of the same worksheet and paste the data there.

    I want to paste the data into a different worksheet, but any code I've tried, to 'Select' or 'Activate' a different worksheet returns an error with the line of code

    Please Login or Register  to view this content.
    Regards

    Tig

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 05-15-2014, 09:32 AM
  2. Find blank cell, insert formula to find median of above cell range
    By lilyeye in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 11:58 AM
  3. [SOLVED] How to find next blank cell in worksheet to add a new contact
    By jpoppet in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 04:52 AM
  4. [SOLVED] Find first non-blank cell after a group of blanks copy offset cells, find next blank, loop
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-21-2012, 06:11 AM
  5. Find a blank cell and calculate the average of all cells above till the next blank
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 11:51 AM

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