+ Reply to Thread
Results 1 to 5 of 5

Not able to get the vba code to take a headerline and add it to each subline based on cond

  1. #1
    Registered User
    Join Date
    04-26-2024
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    4

    Post Not able to get the vba code to take a headerline and add it to each subline based on cond

    TESTROBOTNEW.xlsx

    In the attachment I have a explained what I want in Sheet named "Explain what I want " and in sheet named "Datafile" I have the input file and in the sheet named "Expected Result" I have what I want he Vba code to make out of the input file.. So fare I have not been lucky and the Chat GPT cannot do it for me either so maybe some expert here in this fora can help me..

    It should be simple because I just want the headerline data for each dataset to copied to the Subitemlines
    Last edited by Kellogs; 11-15-2024 at 06:22 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20082) 64-bit
    Posts
    31,737

    Re: Not able to get the vba code to take a headerline and add it to each subline based on

    Wrong file submitted as only sheet is "IMPDATA" ?
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    04-26-2024
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    4

    Re: Not able to get the vba code to take a headerline and add it to each subline based on

    Thanks for telling me - now I have manage to get the right file uploaded.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20082) 64-bit
    Posts
    31,737

    Re: Not able to get the vba code to take a headerline and add it to each subline based on

    Please Login or Register  to view this content.

    See "Expected Result" to run macro
    Attached Files Attached Files

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,228

    Re: Not able to get the vba code to take a headerline and add it to each subline based on

    Take the HeaderdataROW A as a textjoin from B to E with separators = "-"
    and copie this to the subdataRow in this case for A and repeat it for B and C

    Another Option...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Sintek; 11-15-2024 at 09:48 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

+ 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] Cond. Format based on time and day
    By onp in forum Excel General
    Replies: 5
    Last Post: 04-03-2023, 06:21 PM
  2. [SOLVED] VBA to Cond Format cells in column CX6:C based on CX7 being equal to CX6. Apply CF to CX7.
    By A440 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2021, 08:04 AM
  3. Replies: 11
    Last Post: 07-10-2014, 01:56 PM
  4. Return Max Of Column Based On Cond. In Row
    By mcrawford2010 in forum Excel General
    Replies: 3
    Last Post: 02-17-2011, 01:17 PM
  5. Replies: 4
    Last Post: 01-28-2011, 11:34 AM
  6. format cell based on cond. of another
    By dr mint in forum Excel General
    Replies: 2
    Last Post: 03-31-2010, 11:50 PM
  7. Code for meet cond, copy, pasteSpecial, ValuesOnly
    By ufo_pilot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2005, 09:50 AM

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