+ Reply to Thread
Results 1 to 8 of 8

Macro to resolve a logic query

  1. #1
    Registered User
    Join Date
    03-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    67

    Macro to resolve a logic query

    Hi,

    I am not sure if it is possible, but I want to create a macro that will resolve the following logic query:

    Data Table:
    01.png

    Rules:
    1 DataTable starts from Column A to Column L
    2 Result Table has 4 Columns + 1 Column (ID) - we start inputting data in Row 2
    3 Each ID starts with Column A-B (in White) + Next 2 Unused Columns until all 4 columns are filled before going to next Row
    4 The ID is done once there is a Blank Cell or If Reached Column L
    5 A Blank Row will be added after completion of each ID

    Result Table:
    02.png

    I want to post the result in Sheet 2. Following the above logic, if I add more data (after Row 4), it should populate the correct and next data in the Result Table.

    Any idea how to resolve this?

    Logic Table.xlsx
    Attached Images Attached Images

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

    Re: Macro to resolve a logic query

    This should do
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Macro to resolve a logic query

    Simply amazing! Thanks! :D

  4. #4
    Registered User
    Join Date
    03-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Macro to resolve a logic query

    I am trying to decode your array, but do not understand it

    Can you please elaborate so I can learn from it?

    Thanks

  5. #5
    Registered User
    Join Date
    03-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Macro to resolve a logic query

    Can you please elaborate so I can learn from it?

    Thanks
    Last edited by jamewoong; 09-18-2017 at 05:21 AM. Reason: Remove quoting

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

    Re: Macro to resolve a logic query

    1) Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below.

    2) Which line(s) do you not understand?

  7. #7
    Registered User
    Join Date
    03-23-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Macro to resolve a logic query

    Quote Originally Posted by jindon View Post

    2) Which line(s) do you not understand?
    Mind to comments on the whole code? I am not familiar with Ubound and this might make me friend with it.

    Thanks

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

    Re: Macro to resolve a logic query

    If you don't understand the code.

    Google

    1) vba array
    2) vba jagged array

    3) Do a step debug.
    While you are in vbe [View] - [Local Window]
    Click somewhere on the code and Hit F8.
    As you hit F8, you will see all the variables in Local Window.
    Expand the array variable which the have "+" sign and you will see what is actually doing.

+ 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. Help to resolve a small error popping up while running the macro
    By beautify5 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2015, 10:19 AM
  2. Query string to resolve dependant combo box in subform
    By Journeyman3000 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-18-2013, 12:54 AM
  3. Logic query with nested if / or statements and
    By j9v in forum Excel General
    Replies: 0
    Last Post: 12-09-2011, 06:49 AM
  4. Macro doesn't automatically resolve All email address when email is drafted
    By sonny.thind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2011, 12:58 PM
  5. How do I resolve debug error macro Excel 2000? At least, any lead
    By Excel 2000 Macros debugger in forum Excel General
    Replies: 5
    Last Post: 10-25-2005, 04:05 AM
  6. Replies: 1
    Last Post: 06-08-2005, 11:05 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