+ Reply to Thread
Results 1 to 6 of 6

[Solved] Array Count help (newbie)

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    uk
    MS-Off Ver
    2010
    Posts
    6

    [Solved] Array Count help (newbie)

    Hi,

    I have an array of 300 respondents and their answers to 5 questions.

    Basically what I want to do is output next to the respondent number how many times they said X across all questions, for example Person 1, 2. Person 2, 4.
    This is what my array looks like so far, I have it being output just as a check that it works.

    Please Login or Register  to view this content.
    A countif is probably needed or something along those lines with a loop. I have no idea what to do next. I have looked up countif's and they just use the formula but I would like to do it in the VBA code.

    Here is a Sample: sample.xlsm

    Thanks.
    Last edited by zaoth; 07-17-2014 at 01:20 PM. Reason: Added sample

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Array Count help (newbie)

    provide a sample workbook....
    That will help us to help you better...




    Don't forget to click *

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    uk
    MS-Off Ver
    2010
    Posts
    6

    Re: Array Count help (newbie)

    Quote Originally Posted by Vikas_Gautam View Post
    provide a sample workbook....
    That will help us to help you better...




    Don't forget to click *
    Added a sample now. Thanks for the quick reply.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Array Count help (newbie)

    Suggestion....

    dim these two to use as one dimensional array of x per user, and counter for a loop:

    Please Login or Register  to view this content.
    then loop through the users to store their "X"'s:

    Please Login or Register  to view this content.
    What you do with that info afterwards is up to you, but you can loop through users with another for loop....

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Registered User
    Join Date
    07-17-2014
    Location
    uk
    MS-Off Ver
    2010
    Posts
    6

    Re: Array Count help (newbie)

    Quote Originally Posted by Arkadi View Post
    Suggestion....

    dim these two to use as one dimensional array of x per user, and counter for a loop:

    Please Login or Register  to view this content.
    then loop through the users to store their "X"'s:

    Please Login or Register  to view this content.
    What you do with that info afterwards is up to you, but you can loop through users with another for loop....

    Please Login or Register  to view this content.
    Thanks for the help. Had to tweak it a bit to get it working properly but your guidance helped!

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: [Solved] Array Count help (newbie)

    Yeah didn't have your actual sheet to work with, but figured you'd have enough there to work with
    Glad it worked out for you, nicely done.

    Edit OOOPS! missed you did put in a sample sheet
    Last edited by Arkadi; 07-17-2014 at 03:00 PM.

+ 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. newbie: simple column frequency count excel2010
    By wuxx in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-24-2014, 06:11 AM
  2. newbie question on multi-dimensional array
    By sammus in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-02-2006, 10:11 PM
  3. VB Newbie - Counting occurences in array
    By SJC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-28-2005, 10:40 AM
  4. [SOLVED] (Newbie) Copying values from an array to the worksheet
    By Srdjan Kovacevic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2005, 11:05 AM
  5. newbie: count total of number in strings
    By cuongvt in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-15-2005, 11: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