Solved

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

Posted on 2014-11-04
3
155 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now