+ Reply to Thread
Results 1 to 5 of 5

VBA - One line of code not working

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

    VBA - One line of code not working

    Hello

    I have an Excel sheet with "Data" in a tabular format (see attached).
    The tasks are to:
    1. Read along Row1 to find Roles and Organisations (R&O) and tabulate these in a new sheet called "(2) Connections". COMPLETED
    2. Read each following row to find a Connection between the RecordID (1-20 but could be more) and tabulate where there is a Connection. COMPLETED
    3. Continue to read Frequency of each Connection (Daily, 2-3 times per week, etc)= COMPLETED

    This all works well with the following SubRoutine.

    What does NOT WORK is reading the final two sections - those being "Formal" and "Informal". (Line of code highlighted in the Subroutine).

    The result should look like the file Solution1.png.

    HOWEVER, I am generating the incorrect data in Columns 5 and 6.

    ANY help would be appreciated.

    ==============. SUBROUTINE. =============

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by NellyGrice; 04-19-2024 at 05:16 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,490

    Re: VBA - One line of code not working

    Please Login or Register  to view this content.
    Hardly an error reading data. You're just putting the same data in elements 5 and 6 as you put in elements 3 and 4.

    I might be missing something ...
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: VBA - One line of code not working

    NellyGrice,

    Re your PM;
    Try change
    1)
    Please Login or Register  to view this content.
    2) newly added line to
    Please Login or Register  to view this content.
    If this is not how you want, need clear explanation for data in new columns, E & F.
    Last edited by jindon; 04-19-2024 at 08:10 PM.

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

    Re: VBA - One line of code not working

    Jindon
    That has solved it perfectly.
    THANK YOU

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,490

    Re: VBA - One line of code not working

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Code remove blank line in one cell is not working
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2020, 12:30 AM
  2. VBA code to copy line items from form - overriding previous line item
    By dkostyan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2016, 11:19 AM
  3. Replies: 1
    Last Post: 11-13-2013, 10:28 AM
  4. Form VB stopped working once I added a few line, "Form" Code Problem
    By amaro5211 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2013, 10:50 PM
  5. Removing code line stops code working?!?!?
    By adamj1910 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 02:36 PM
  6. [SOLVED] VBA Code to paste on next available line not working?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-23-2012, 10:28 PM
  7. Code to paste info on next available line not working
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 04:07 AM

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