+ Reply to Thread
Results 1 to 5 of 5

Concatenate and Count Values in Loop Function

  1. #1
    Forum Contributor
    Join Date
    12-09-2015
    Location
    Virginia, USA
    MS-Off Ver
    2007
    Posts
    123

    Concatenate and Count Values in Loop Function

    Hello,

    I'm working on a report that I am trying to have the number of students from a particular school listed in the header of that school. The problem I am having is that my "counter" isn't returning the value into the header and I keep getting a #Name error. I'm also not sure if it has something to do with not being able to get the true count without reading through all of the lines in the workbook.


    Here's how the code works. It finds the word "Affiliation" then deletes this row to eliminate all of the table headers. Then it unmerges the header row. I am wanting to concatenate the School name with the number of people attached to that school. I've attached a sample workbook, so hopefully that makes more sense.


    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Concatenate and Count Values in Loop Function

    Not sure why you want to do all that vba and then use a concatenate formula instead of having VBA just put it in as a string, but:

    Please Login or Register  to view this content.
    Although this will result in 0's
    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.

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

    Re: Concatenate and Count Values in Loop Function

    Here is another option:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-09-2015
    Location
    Virginia, USA
    MS-Off Ver
    2007
    Posts
    123

    Re: Concatenate and Count Values in Loop Function

    This was great. I was happy the "&" solved the name issue (I've got to get better with VBA Syntax) and working from Bottom up was definitely the way to go!

    Thanks for your help!

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

    Re: Concatenate and Count Values in Loop Function

    Glad to help

    Thanks for the feedback, the rep, and marking the thread as solved!

+ 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. Adding values to concatenate function by clicking buttons
    By pomper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2017, 02:29 PM
  2. CONCATENATE function for values to be separated by commas
    By dejhantulip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2016, 05:12 PM
  3. Concatenate 3 cells and have in 2nd cell, - loop the function which has merged cell
    By gmbrinda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2014, 04:10 AM
  4. Adding a count to concatenate range function
    By mbus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-12-2013, 11:18 PM
  5. [SOLVED] Excel function or script for concatenate all values from B:B for same columns in A:A
    By Odeen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2012, 10:29 AM
  6. Count the values between range and loop
    By Raviprasad.k in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2012, 09:42 AM
  7. Using a concatenate formula to count unique values
    By braydon16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2011, 03:10 PM

Tags for this Thread

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