Solved

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

Posted on 2014-11-04
3
159 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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

808 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