textbox show count of cells in one column with value of another text

  • Hello,


    I was wondering if anyone knows how to show in a userform textbox, the count of cells in for example, column A that are equivalent to another textbox in VBA?

  • Re: textbox show count of cells in one column with value of another text


    Hello,


    Welcome to the Forum ...


    There are many many contributors ready to help you out ...


    But ... you request has to be more precise ...


    Ideally, just attach a sample workbook with your next message ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: textbox show count of cells in one column with value of another text


    Is this what you mean

  • Re: textbox show count of cells in one column with value of another text


    Oh thank you :D I'll attach something... Basically , I want to have a button that says track, show the total number of the date shown in doc_text that's in column A, in the nct_text




    how do you attach an excel? it keeps on saying upload failed? :(

  • Re: textbox show count of cells in one column with value of another text


    Hello,


    Below is the procedure and all the explanations ...


    How to Attach a Sample Workbook
    To attach a workbook:
    1. Click 'Go Advanced' at the bottom right of the Reply Box.
    2. In the new window click the Paper Clip Icon.
    3. In the new window that pops up click 'Add Files'.
    4. Click 'Select File' and browse to the required file.
    5. Click 'Upload File'.
    6. Click 'Done' when the selected file appears in the box at the bottom of the window.



    The maximum file size allowed is 3MB, if your file is larger than this you can try zipping it to reduce the size. If still too large, or if your actual file contains sensitive data, then create a sample workbook with reduced amount of data or with sanitised data.
    When creating a sample workbook it is essential that the structure of the actual workbook is retained.
    • If data has been sanitised, then the sanitised data must be of the same type as the original (text still text, numbers still numbers, dates still dates etc.).
    • The Layout of data on each sheet remains the same.
    • If actual data contains blank rows, columns or cells then include the same in the sample data.
    • If a cell contains a formula keep the formula in the sample, in other words do not create the sample file by pasting just values from the actual file.


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: textbox show count of cells in one column with value of another text


    Quote from airyu;797344

    Thanks Roy! I'm not sure of how I could apply that though...forum.ozgrid.com/index.php?attachment/73376/


    didn't attach my original work since there seems to be an error in attaching it ....



    so basically , I want to compare the date today data to the column a data and show the count in the total calls today box when you click the # of calls. I tried using your code but Ikept on getting errors.

  • Re: textbox show count of cells in one column with value of another text


    Quote from royUK;797363

    What errors?


    ry zipping your file before attaching


    [h=3][/h]
    method or data member not found. i attached a sample simplified file in my previous reply.

  • Re: textbox show count of cells in one column with value of another text


    That error seems to indicate that you have either used the wrong names of the controls or don't have the correct type of control. The naming of your controls actually is not good, they should really give some idea of what the control is used for.


    You sheet and userform date formats don't match. For the code to work they must match.


    I have amended the form and added the count. The green button adds today's dat so it will return zero unless you add or change some of the sample dates

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!