+ Reply to Thread
Results 1 to 3 of 3

Macro to find next empty cell in specific range

  1. #1
    Registered User
    Join Date
    02-04-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Macro to find next empty cell in specific range

    I am trying to write code that will post a value into the next empty cell in range B14:b33, searching downwards. I have searched the forums and seen lots of things 'almost' like my problem, but generally they are to find the first empty row, whereas I want to find the first empty cell in the particular range, even if there is data in the rest of the row or column.

    I have tried lots of things but can not get it to work. The closest I have come is
    Range("B14").End(xlDown).Offset(0, 1) = "1"
    But this puts the value into the cell offset from where the button is, and not from b14 downwards.

    I know it is probably really simple and I would be very grateful if anyone can point out where I am going wrong :-(

    Thanks
    Nina

  2. #2
    Forum Contributor
    Join Date
    05-29-2013
    Location
    MD
    MS-Off Ver
    Excel 365
    Posts
    148

    Re: Macro to find next empty cell in specific range

    Try:

    Please Login or Register  to view this content.
    with Offset(0, 1) you are selecting the cell to the right (in column C), but with (1, 0) you are selecting the next one down.

  3. #3
    Registered User
    Join Date
    02-04-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Macro to find next empty cell in specific range

    Thanks for this, schoolboy error

+ 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