+ Reply to Thread
Results 1 to 9 of 9

VB code to populate (count) data from vertical alignment to a sheet with existing data

  1. #1
    Registered User
    Join Date
    06-28-2016
    Location
    Bangkok
    MS-Off Ver
    2010
    Posts
    80

    VB code to populate (count) data from vertical alignment to a sheet with existing data

    Hi everyone,

    Could anyone provide a VB code that populates the input data to a sheet with existing data that align with the following requirements?

    For example,


    • For row 2 of the input sheet, we have a record for the reference code '123.456.789.001' with implemented product 'CM1'. Then, put 1 in the output sheet if row is '123.456.789.001’ and column is ‘CM1’ as cell B2 (blue shaded).
    • For row 14 of the input sheet, we have a record for the reference code ‘123.456.789.003' with implemented product 'CM7'. Then, put 1 in the output sheet if row is '123.456.789.003’ and column is ‘CM7’ as cell H4 (blue shaded).
    • The existing data (such as cell B3 and cell J3 – yellow shaded) should still in the output sheet.

    The example with input samples, existing output and expected output has been attached in this topic.

    Thank you and have a nice day.

    N.B. The real data contains more than 40,000 records, but they are sticky confidential.
    Attached Files Attached Files
    Last edited by cmokasak; 08-24-2016 at 04:50 AM.

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

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Try
    Please Login or Register  to view this content.
    Last edited by jindon; 08-24-2016 at 03:57 AM. Reason: populate (count) ....

  3. #3
    Registered User
    Join Date
    06-28-2016
    Location
    Bangkok
    MS-Off Ver
    2010
    Posts
    80

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Hi jindon,

    It works great with the data population requirement.
    But, the existing data (such as cell B3 and cell J3 – yellow shaded) should also still in the output sheet.

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

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Can you give me a clear logic for that?

  5. #5
    Registered User
    Join Date
    06-28-2016
    Location
    Bangkok
    MS-Off Ver
    2010
    Posts
    80

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Hi jindon,

    Your code is work great to transform input data (tab 'Input') to output.
    But, the existing data (such as cell B3 and cell J3 in the tab 'existing output') should also still in our output sheet.

    For example (in the expected output sheet):-

    The blue shaded data are what from the VB code.
    But, I have existing data (yellow shade) that should also added to the output sheet in addition to the blue shaded data.
    Last edited by cmokasak; 08-24-2016 at 04:15 AM.

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

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Got it.
    Please Login or Register  to view this content.
    Quote Originally Posted by cmokasak
    Would it be possible to add this code to a button an excel sheet?
    Attached Files Attached Files
    Last edited by jindon; 08-24-2016 at 04:26 AM. Reason: File Attached

  7. #7
    Registered User
    Join Date
    06-28-2016
    Location
    Bangkok
    MS-Off Ver
    2010
    Posts
    80

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Could I have another request?

    Would it be possible to add this code to a button an excel sheet?

  8. #8
    Registered User
    Join Date
    06-28-2016
    Location
    Bangkok
    MS-Off Ver
    2010
    Posts
    80

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    Hi jindon,

    Thank you for your great help.
    I have a reputation score to your profile.
    Have a nice day

    N.B. This topic has been marked as resolved.

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

    Re: VB code to populate (count) data from vertical alignment to a sheet with existing data

    You are welcome and thanks for the rep.

+ 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. [SOLVED] VBA code required to insert extra/New sheets with existing sheet data
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2015, 01:52 AM
  2. Populate existing spreadsheet with new data
    By Coral-Reefer in forum Excel General
    Replies: 3
    Last Post: 01-28-2015, 09:43 AM
  3. how to populate unique count in sheet 1 when the data is present in sheet 2.
    By Vishnu Balan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-28-2014, 11:20 PM
  4. Need Code to Count Data On Data Sheet
    By irusenshi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2013, 10:21 AM
  5. vertical alignment of data greater than '0' from horizontal layout data
    By itsmesunilb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 12:00 PM
  6. Populate a range of vertical data based on the value in an adjacent cell?
    By juniperjacobs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-19-2010, 12:14 PM
  7. Replies: 1
    Last Post: 08-15-2009, 05:52 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