+ Reply to Thread
Results 1 to 4 of 4

I want to create a variable based on the number of Y's in a column

  1. #1
    Registered User
    Join Date
    08-08-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    15

    I want to create a variable based on the number of Y's in a column

    I have a column in a list of data that I've labeled each line with Y or N. I want to make a variable equal the number of Y's in that column. Once again, I'm very new to VBA and I'm using you all and a book that I'm going to replace very soon to learn as references to learn as much as I can. So far, this is what I've got. FYI - FinalRow works just fine as it's used in other parts of the macro.
    Please Login or Register  to view this content.
    Thanks for any help you can offer.
    Last edited by Jubb; 03-24-2014 at 06:17 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Try this, which assumes FinalRow is defined elsewhere in your code.
    Please Login or Register  to view this content.
    PS Can you edit your post to add code tags?

    There's a link in my signature that explains how to.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-08-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I want to create a variable based on the number of Y's in a column

    That's better, thank you. And, thanks for the help with the code tags.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: I want to create a variable based on the number of Y's in a column

    Jubb

    Is the problem solved?

    It is then you can select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 10
    Last Post: 01-30-2014, 04:42 PM
  2. [SOLVED] Sum column based on variable start and variable end months
    By Steve N. in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-06-2013, 08:01 PM
  3. [SOLVED] Sorting rows of data based off a single column for a variable number of entries.
    By soxcrates in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2012, 12:31 PM
  4. Replies: 6
    Last Post: 04-14-2012, 04:07 AM
  5. [SOLVED] Sum cells based on a row variable and seperate column variable
    By CheeseHeadTransplant in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-23-2005, 02: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