+ Reply to Thread
Results 1 to 3 of 3

Need help with a macro to copy rows into two columns, ignoring empty cells.

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    England
    MS-Off Ver
    Mac Office 2011
    Posts
    2

    Thumbs up Need help with a macro to copy rows into two columns, ignoring empty cells.

    Hi,

    I have a list of questions in a spreadsheet, where each row consists of a question, up to 5 possible answers, and a correct answer.

    table1.jpg

    I'm trying to make a macro which will copy each row and paste it into two columns, where each question is separated by an empty row. I'd like it to ignore empty cells, for example if there are only two option answers it won't show the empty cells for Options C, D and E.

    table2.jpg

    If anyone could help I'd be really grateful! Thanks.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need help with a macro to copy rows into two columns, ignoring empty cells.

    Give this a try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-10-2014
    Location
    England
    MS-Off Ver
    Mac Office 2011
    Posts
    2

    Re: Need help with a macro to copy rows into two columns, ignoring empty cells.

    Works beautifully, many thanks!

+ 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] Macro to get random cell in a range (Ignoring empty cells)
    By ghoneim in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-24-2017, 11:10 AM
  2. Macro to copy rows based on background color of cells within a range of columns
    By jpitt916 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2013, 06:16 PM
  3. [SOLVED] Macro to copy rows based on background color of cells within a range of columns
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-19-2013, 01:30 PM
  4. Macro to autosize rows ignoring hidden columns
    By CJ-22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2012, 09:52 AM
  5. Copying Data ignoring empty rows.
    By Zagra147 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2006, 04:56 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