+ Reply to Thread
Results 1 to 3 of 3

VBA - Excel - Count cells in Column A - Add rows in separate sheet

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013
    Posts
    15

    VBA - Excel - Count cells in Column A - Add rows in separate sheet

    Hello all,

    I am working on creating a file that has 2 tabs. One sheet = "BIT" and the other "TRS". What I would like to do is, count the number of filled cells in column A (starting at cell A4), then switch over to tab "TRS", and insert that number of rows - 3, starting at row 8. Count of column A in "BIT" can be variable.

    Ex. - If there are 6 cells with values from cell A4 and below, in "BIT" , then insert 3 cells in "TRS" starting at row 8

    I have attached an example.

    Your help is appreciated!

    AW
    Attached Files Attached Files
    Last edited by alw99; 08-07-2014 at 02:26 PM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA - Excel - Count cells in Column A - Add rows in separate sheet

    Try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: VBA - Excel - Count cells in Column A - Add rows in separate sheet

    Quote Originally Posted by stnkynts View Post
    Try:

    Please Login or Register  to view this content.

    Thank you so much for your promp response and solution. I did have to make a tiny modification to the code as it inserted cells, and not rows.

    Original line
    Sheets("TRS").Range("A8").Resize(lCount - 3).Insert Shift:=xlDown

    Modified
    Sheets("TRS").Range("8:8").Resize(lCount - 3).Insert Shift:=xlDown

    Thanks again,

    AW

+ 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. Count number of cells associated with value in separate column
    By lamdl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-13-2014, 03:48 PM
  2. Transposing multiple rows from one sheet into one column on separate sheet
    By zcarroll in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2013, 01:03 PM
  3. Count names from separate worksheet, and from separate rows
    By juicestain09 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-05-2012, 09:36 PM
  4. Replies: 2
    Last Post: 07-24-2006, 08:49 AM
  5. Count rows in separate column
    By Tseug in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2005, 04:43 PM

Tags for this Thread

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