+ Reply to Thread
Results 1 to 16 of 16

copy column headers into rows if it meets a specific criteria

  1. #1
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    copy column headers into rows if it meets a specific criteria

    hello

    this forum have been a great help to me in my past projects and im hoping experts here would extend the same help on my current project.

    this macro copies the entire row from "deadlines" X number of times in "que" sheet.

    i was wondering if it is possible to copy the headings in column Q-Z and transposed it into rows if the formula result is N/A

    i have attached a sample worksheet with a very detailed explanation to express what i want to happen.

    this would really be a big help to me...

    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    Any help please?

    Just wanted to add that number of rows in deadline sheet varies... but the number of column and headers stays the same...

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    Melody10,
    Need more clarification!
    What do you want to copy and where?

  4. #4
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    Its you again... thank you for your time.

    The purpose of this file is i wanted to be able to sort all undone tasks according to deadline. That is why i wanted the tasks to be in rows rather than columns.

    So for example aaaa, task 4,5,6 are not yet done (they are marked as n/a). What i want is that when i run your macro, the task name will be listed in que sheet. So if 3 tasks are not yet done, entire row will be copied 3 times in the que sheet and eac row will be marked for each task under the "task" column.

    I hope this clarifies my question.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    You have a count if formula in A9 which calculates the N/A and code copies the rows based on A9.

    "each row will be marked for each task under the "task" column"
    Sorry, not clear yet to me.
    What do you want to add to the code and countif formula?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    "i was wondering if it is possible to copy the headings in column Q-Z and transposed it into rows if the formula result is N/A"
    You have headings Q-Z as tasks. So, where do you want to copy if the heading has a N/A? Which row?

  7. #7
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    i wanted it to be copied in the "que sheet" column H.... so for each task undone there will be 1 row in the "que sheet"

    thank you soooo much for your patience in me.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    Try the attached
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    it works exactly as i wanted... just 1 tiny thing... if i added another row in the deadlines sheet, the task names are not being copied in que sheet.

    the deadline sheet would have multiple rows, and your macro should work exactly as you did for row 9.

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    Do you mean you want to expand column Z, or add a row below 9?
    At the moment you have the task row and N/A row.

  11. #11
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    add multiple rows below 9... the number of rows will vary from day to day but the number of columns will always be the same.

  12. #12
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    any luck sir ab33?

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    Melody,
    Yes, it can be done but requires to change the code completely as it now requires a two dimension loop. Please expand the rows and attach a sample and will write you the code.

  14. #14
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    hi

    please see attached file... the number of rows may increase or decrease depending on our volume
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy column headers into rows if it meets a specific criteria

    Try the attached
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: copy column headers into rows if it meets a specific criteria

    perfect!!! thank yoi!!!

+ 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. Automatically Move Rows When one Column meets a Criteria
    By Apokolips in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2013, 09:55 PM
  2. Print specific rows/columns IF a cell meets criteria
    By tiannaleft in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-16-2012, 08:51 AM
  3. [SOLVED] copy select columns instead of entire row if it meets specific criteria
    By liz80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2012, 04:26 PM
  4. VBA: Copy cell if specific column meets 2 conditions
    By Aakron in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2012, 03:29 PM
  5. Copy rows of data if date in cells meets certain date criteria
    By angrycartoon12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2010, 05:57 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