+ Reply to Thread
Results 1 to 1 of 1

Testing for blank cells within Copy / Paste Array

  1. #1
    Registered User
    Join Date
    07-11-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Testing for blank cells within Copy / Paste Array

    I'm still feeling my way around VBA arrays so please forgive what is quick likely a silly question.

    I'm trying to streamline a template to consolidate survey questions in which responders can enter multiple answers for the same question (Example: List all of the pets in your household and what foods they eat) so the information can then be fed into a pivot table.

    (I've attached an example of my current template with fake data)

    I've managed to get everything copy/pasted by pasting entry by entry but I'm at the stage where I'm trying to speed it up.

    in my original code I tested the first cell in each 'entry range' as a trigger to exit the For/next loop but I'm having difficulty finding the equivalent if I write the results to an array and then paste in one go.

    Ideally I'd like to be able to copy data even if the responder didn't enter information in the first field (as this can relate to people's names and as such they sometimes omit their titles) so I'm trying to test the range.

    The code I've got is as below and my thought was to do an If Else loop to check for all of the Entry data fields being blank (first 2 columns are unique identifers which are used in the pivots) and if so, write over those particular entries. I'm sure that there's a better way though.

    I'd be very grateful for any assistance anyone was able to offer.

    Please Login or Register  to view this content.

+ 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 to copy non blank cells and paste to other worksheet
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2013, 06:22 PM
  2. [SOLVED] copy/paste macro to selected blank cells
    By fumc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2012, 10:08 PM
  3. Testing for Blank Cells
    By CaptinKrunch in forum Excel General
    Replies: 30
    Last Post: 10-06-2009, 02:54 PM
  4. Copy and paste macro-blank cells thereafter.
    By Bikernick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2006, 12:00 PM

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