Solved

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

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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 …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

732 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