Solved

Copy rows into a new excel document, where column has a value in.

Posted on 2014-11-04
3
162 Views
Last Modified: 2014-11-04
Hi

I have a document that contains lots of rows, I want to automatically copy all the rows that contain a number in column G, into a new excel spreadsheet.

So I am thinking a macro would work best for this?

Thanks,

Andy
5digitareacodestest.xls
0
Comment
Question by:andygen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40422626
A macro could do this, but you can easily do this manually with these steps:

1) Make a copy of the existing sheet, either by:
    a) [Ctrl]+click-n-drag the sheet tab to the right until you see a black triangle then release.  A duplicate sheet is created.
    b) Right-click on the sheet tab, select "Move or Copy..." from the shortcut menu.  Click the "Create a copy" check box and click the "OK" button.
2) Rename the new sheet as you wish
3) Turn on Data Filters
    a) Select cell A1
    b) Press [Shift]+[Ctrl]+[End] to select all the cells in the range
    c) Menu:  Data - Filter
4) Click the drop filter in column G.  Click the "(Select All)" box to turn off all filters, then scroll down and click the "(Blanks)" check box.  Click the "OK" button.
5) Delete these rows
    a) Select cell A2
    b) Press [Shift]+[Ctrl]+[End] to select all the cells in the range
    c) Right-click anywhere in the selected area and select "Delete Row" from the shortcut menu.  You'll be prompted again; click the "OK" button.
6) Turn off the Filters.

You now have a sheet containing only rows that have a value in column G.

The example file you provided had 9,435 rows with blank values out of 62,085 rows of data.  You can check your steps against this to ensure you have done it correctly.

Regards,
-Glenn
0
 

Author Comment

by:andygen
ID: 40422714
Hi Glenn

Worked great thanks!

Andy
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40422830
You're welcome.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question