Results 1 to 4 of 4

Find first empty cell and fill in formula too the last row of data in another column

Threaded View

fireguy7 Find first empty cell and... 10-17-2018, 05:28 PM
Kaper Re: Find first empty cell and... 10-17-2018, 05:35 PM
fireguy7 Re: Find first empty cell and... 10-17-2018, 05:40 PM
AB33 Re: Find first empty cell and... 10-17-2018, 05:51 PM
  1. #1
    Forum Contributor
    Join Date
    07-31-2009
    Location
    Lincoln, USA
    MS-Off Ver
    Excel 2007 and excel 2010
    Posts
    142

    Find first empty cell and fill in formula too the last row of data in another column

    Hello and thank you in advance.

    I have a sheet with data in column A and I'm going to input the date the data was received in column B. each week I'll add more data and I need a macro to find the end of the current set of dates and fill in today's date to the end all the new data.

    On the attached test sheet I tried this which finds and selects the first empty cell but where I'm stuck is creating the string to location and select from the first empty in column B to the end of the data in column A. I can't use a static reference to cells because the data amount and location will change week to week.

    Sub test()
    Dim lr As Long
    Dim Ar As Long
    Dim rng As Range
    Dim ang As Range
    
    On Error Resume Next
    lr = Columns("B:B").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Set rng = Range("B" & lr).Offset(1, 0).Select
    Ar = Columns("B" & rng & "B").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Set ang = Range("R" & rng & "R" & Ar)
    ang = "=today()"
    End Sub
    Test sheet attached to make this easier.
    Last edited by fireguy7; 10-17-2018 at 05:51 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do i find an empty cell and fill it from another worksheet?
    By Pipen88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2014, 03:21 PM
  2. Replies: 5
    Last Post: 05-13-2014, 10:19 AM
  3. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  4. [SOLVED] Find next empty cell in column to add data to
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 12-21-2013, 02:11 AM
  5. [SOLVED] Adding a button to find string in column and fill out the first empty cell
    By vaznlyfe in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-27-2012, 04:16 PM
  6. Replies: 1
    Last Post: 03-02-2010, 01:23 PM
  7. Fill an empty cell with first data cell in the same column, next row(s) down
    By aquavion in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-02-2009, 04:22 PM

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