+ Reply to Thread
Results 1 to 4 of 4

Using Counta with a variable column

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Using Counta with a variable column

    I am trying to get the number of the last used row of a column also defined by a number.
    When I use the usual way of doing this
    Please Login or Register  to view this content.
    This will give me the expected result when I step through the code but gives me an empty result when I run the code.
    Rather than spend hours trying to sort that out I decided to try another way as I had a column nearby which is filled on every row
    so I tried the following:
    Please Login or Register  to view this content.
    This is syntactically wrong and I would very much appreciate some help to put it right
    StartPlace is an integer. The number of a column
    John

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Using Counta with a variable column

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: Using Counta with a variable column

    Nigelog.
    Thanks for your interest. Unfortunately your suggestion doesn't work as whatever column is chosen it gives the answer 1. This is the number of used columns in an array of 1 column (I Think)
    John

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Using Counta with a variable column

    If you have an entry in each cell of the worksheet column it would give lrow
    Please Login or Register  to view this content.
    try on a variably filled worksheet
    Attached Files Attached Files
    Last edited by nigelog; 12-10-2020 at 11:54 AM.

+ 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. Combination of CountA + For + If + Variable
    By PoorFrog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2020, 02:03 PM
  2. Trying to use Counta but only if another column = x
    By Feril in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-16-2016, 02:27 AM
  3. [SOLVED] I need to have a variable for a tab name in a COUNTA formula
    By russkirk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-05-2013, 09:39 PM
  4. [SOLVED] Counta of a column G if column B = matching text
    By Aisling in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-01-2012, 06:45 AM
  5. Can the CountA range be a variable?
    By Richard2012 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2012, 03:46 PM
  6. Using CountA to define a number variable
    By paddingtonstation in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2012, 01:15 PM
  7. Setting a variable using COUNTA
    By Gerrym in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-24-2005, 05:06 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