View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
EMB EMB is offline
external usenet poster
 
Posts: 3
Default Create a small table from a large table by skipping empty columns

I have a question I am trying to solve. I have a table that, for many rows,
does not have every column filled in. For example, the table would look like
this:

First Last Color Age Fruit Vegatable
John Smith Blue 15 Celery
Jane Doe 50 Orange
Jim Red Carrot
Jones 90 Apple Pepper

and I want it to look like this:
John Smith Blue 15 Celery
Jane Doe 50 Orange
Jim Red Carrot
Jones 90 Apple Pepper

Basically, if a certain column is "empty" a specific row, I want to skip it
and paste the next filled in value next to a previous filled in value. Is
there any way to do this in a Macro? I'd like to read from my "old" table to
create a "new" table.

The solution does not have to be elegant, and I can hard code in start rows
and end rows.