+ Reply to Thread
Results 1 to 4 of 4

Counting cells in a column to add formulas to that equal number of cells

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    Earth
    MS-Off Ver
    2007
    Posts
    43

    Counting cells in a column to add formulas to that equal number of cells

    What I am trying to do is count how many cells have data and then drop in formulas in some cells to the right, according to how many cells I have counted as NOT being empty. Attached is a picture that may more clearly explain what I am trying to do.

    There must be a better way to do this... because what I have isn't working this is where my macro is running into problems:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by flipjarg; 07-11-2012 at 11:30 AM. Reason: solved

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Counting cells in a column to add formulas to that equal number of cells

    Maybe something like:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-14-2009
    Location
    Earth
    MS-Off Ver
    2007
    Posts
    43

    Re: Counting cells in a column to add formulas to that equal number of cells

    Hey, this works great! Now I just need to do some reading so I understand how it works!

  4. #4
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Counting cells in a column to add formulas to that equal number of cells

    Please Login or Register  to view this content.
    In an Excel Spread sheet use Ctrl + an arrow key. Up, down, left, and right.

    Rows.Count is the last row in a spread sheet.

    Cells(Rows.Count, "B") is the last cell in column B.

    End works like Ctrl+ arrow key.

    End(xlUp) = Ctrl + up arrow key.

    So Cells(Rows.Count, "B").End(xlUp) is the last cell in column B with data.

    .Row gives the row where that cell is located.

+ 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