+ Reply to Thread
Results 1 to 4 of 4

Using VBA to extract various fields in a Table

  1. #1
    Registered User
    Join Date
    06-12-2016
    Location
    Wareham, UK
    MS-Off Ver
    365 Excel for Mac version 16.81
    Posts
    16

    Using VBA to extract various fields in a Table

    Hello, this is my second post and was impressed by the response to my first post yesterday.

    I will outline the issues using sample data and have attached a file.
    VBA is new to me although I am familiar with Arduino and basic.

    By way of introduction to the data and its meaning, Questionnaires are completed by a number of people and these are listed in Column A headed �Record ID�


    Each RecordID (Person) may connect with a service provider, these are listed in Cells H1 to M1 - an example is H1 which has "Senior Community Engagement Officer, Department of Communities�. This data is classed as a Role and Organisation (R&O) - note the number of R&Os can vary from 2 to 20 and the RecordID can vary from 1 to 25.
    I have managed to obtain a subroutine via this Forum (thank you Jindon) to tease these out and list them separately under Column headings �Role� & �Organisation�/



    If you read along each RecordID you can see where a service provider has been connected with. There may be more than one service provider. Secondly, each time they connect with a service provider there is a Frequency Eg; Daily, 2-3 times a week, weekly, monthly, quarterly, yearly).
    UPDATE (31-03-24) I HAVE RECEIVED A SUBROUTINE THAT SOLVES THE IMMEDIATE ISSUE - SEE THREAD.

    ANOTHER REQUIREMENT HAS ARRIVED WHERE IN THE "Data" TAB THERE ARE TWO MORE TABLES TO ASCERTAIN WHETHER THE "Connection" IS "Formal" OR "Informal" Responses can be "yes, "No" or a blank cell.


    I have provided a second Tab named �Example Result� to illustrate the solution I am looking for. I currently do this manually and you can imagine that larger data sheets are very challenging!

    Here is the first part of the solution - the second tab shows more. Please note, I didn�t finish the solution for "formal" and "Informal" Connections as I only wanted to provide an illustration.


    You will see that a RecordID may be listed more than once dependent upon the Connections they have made. Similarly, a RecordID may not appear as in RecordID = 4 (presumably the questionnaire was incomplete.

    Thanks you for your interest
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by NellyGrice; 03-31-2024 at 09:35 AM. Reason: Updated for new requirement

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Using VBA to extract various fields in a Table

    See if this works,
    Please Login or Register  to view this content.
    Last edited by jindon; 03-29-2024 at 10:26 PM.

  3. #3
    Registered User
    Join Date
    06-12-2016
    Location
    Wareham, UK
    MS-Off Ver
    365 Excel for Mac version 16.81
    Posts
    16

    Re: Using VBA to extract various fields in a Table

    Jindon
    Your solution works beautifully.
    THANK YOU SO MUCH.
    Very much appreciate your efforts.
    Neil

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Using VBA to extract various fields in a Table

    Re: your PM.

    OOps, you are right. it should be 1.
    b(n, 3) = Split(a(1, ii), ",")(0) should be
    Please Login or Register  to view this content.

+ 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: 27
    Last Post: 03-29-2019, 10:47 PM
  2. Check 2 fields from one table and match with 2 fields of other table
    By VaibhavAr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2017, 02:40 AM
  3. Hide fields(table columns) from Pivot table Fields
    By alexholly in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-28-2017, 08:24 PM
  4. Replies: 2
    Last Post: 10-26-2015, 06:49 AM
  5. Hiding Specific Fields on Pivot Table Fields
    By branco in forum Excel General
    Replies: 7
    Last Post: 03-26-2010, 09:39 AM
  6. How to Disable automatic fields in pivot table like total and count on fields
    By anushka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2009, 07:53 AM
  7. Differentiate between column fields and data fields in a pivot table
    By whiteheadw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 01:59 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