+ Reply to Thread
Results 1 to 2 of 2

Determine Last row of data in a Column and Use value to copy a Formula in another column

  1. #1
    Registered User
    Join Date
    03-22-2017
    Location
    USA
    MS-Off Ver
    2011
    Posts
    1

    Lightbulb Determine Last row of data in a Column and Use value to copy a Formula in another column

    Hello,

    Here is what I am trying to do. I want to determine the last row containing data in a column and use that number as a reference to copy a formula in a different column to the same row number. Here is a worksheet:


    Indicator Payee ID Payee Name len
    P 222201 PHARMACY SOLU 6
    P
    p
    p
    p
    p
    p
    p
    p
    p


    Column A (Indicator) has 10 records in it. I want to get that figure using this command:

    Range("A" & Rows.Count).End(xlUp).Row

    Once I obtain the number of rows that have data in them (in this instance, 10), I want to proceed to column D (len) and copy the formula that is in row 1 to the LAST row that the above code calculated (in this case, 10). Can someone shed some light as to how I would do this??

    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,528

    Re: Determine Last row of data in a Column and Use value to copy a Formula in another colu

    Something like:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Copy data from sheet1 column with dynamic date, and copy data to second sheet column
    By Renaliiii in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2016, 04:44 PM
  2. Replies: 5
    Last Post: 11-17-2014, 02:40 PM
  3. [SOLVED] Dynamic search; using column # result to determine column used for column/row match.
    By David Brunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2014, 09:57 PM
  4. Copy data from column K to column B if Column C and column I match
    By goog2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2013, 12:19 PM
  5. Replies: 1
    Last Post: 02-23-2013, 07:10 AM
  6. Copy Formula down the column based on data in the next column
    By karl_009 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2008, 09:48 AM
  7. [SOLVED] Determine last row in columns 1-4 to copy a formula in column 5
    By GEB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2005, 05:05 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