ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Selective Column deletion (https://www.excelbanter.com/excel-discussion-misc-queries/61818-selective-column-deletion.html)

mattrane

Selective Column deletion
 
Hi,
I'm not real familiar with writing code in Excel, so my question is
probably fairly simple.

I'm working with Census data and before importing it into SAS I want to
clean it up a bit in Excel. The problem is that the Census summary
tables give me three columns of information (an upper, lower, and
estimate), when I only need one (estimate). The matrices I work with a
usually in the 52x2000 range, so it gets very tedious to delete them by
hand. Can excel handle a 'delete if' or 'select if, then delete' type
of command.
something like:
delete if (column(contains(upper OR lower));

Thanks for any help.

*****************************************
Matthew Hall
Population Research Institute
The Pennsylvania State University


Dave Peterson

Selective Column deletion
 
Select the column with that description stuff.

Data|Filter|Autofilter
Now use the arrow to apply a custom filter.
Choose Custom
Does not equal Estimate

Select the visible rows and
edit|delete



mattrane wrote:

Hi,
I'm not real familiar with writing code in Excel, so my question is
probably fairly simple.

I'm working with Census data and before importing it into SAS I want to
clean it up a bit in Excel. The problem is that the Census summary
tables give me three columns of information (an upper, lower, and
estimate), when I only need one (estimate). The matrices I work with a
usually in the 52x2000 range, so it gets very tedious to delete them by
hand. Can excel handle a 'delete if' or 'select if, then delete' type
of command.
something like:
delete if (column(contains(upper OR lower));

Thanks for any help.

*****************************************
Matthew Hall
Population Research Institute
The Pennsylvania State University


--

Dave Peterson

Dave Peterson

Selective Column deletion
 
And then use
Data|filter|autofilter
to remove the filter (and see all the data)

Dave Peterson wrote:

Select the column with that description stuff.

Data|Filter|Autofilter
Now use the arrow to apply a custom filter.
Choose Custom
Does not equal Estimate

Select the visible rows and
edit|delete

mattrane wrote:

Hi,
I'm not real familiar with writing code in Excel, so my question is
probably fairly simple.

I'm working with Census data and before importing it into SAS I want to
clean it up a bit in Excel. The problem is that the Census summary
tables give me three columns of information (an upper, lower, and
estimate), when I only need one (estimate). The matrices I work with a
usually in the 52x2000 range, so it gets very tedious to delete them by
hand. Can excel handle a 'delete if' or 'select if, then delete' type
of command.
something like:
delete if (column(contains(upper OR lower));

Thanks for any help.

*****************************************
Matthew Hall
Population Research Institute
The Pennsylvania State University


--

Dave Peterson


--

Dave Peterson

mattrane

Selective Column deletion
 
Thanks Dave,

The thing is the column 'description' (upper lower estimate) is a
cell. For example. I have these three columns:
Northern Europe, United Kingdom (Estimate); Northern Europe, United
Kingdom (Lower); Northern Europe, United Kingdom (Upper); in cells, say
A1, A2, A3. I want to delete A2 and A3 and all of the information below
them (the values for particular states).

Thanks


Dave Peterson

Selective Column deletion
 
I don't understand the layout of your data.

You may want to post a typical example and what should happen to that example.

(Just plain text--please don't attach a workbook.)

mattrane wrote:

Thanks Dave,

The thing is the column 'description' (upper lower estimate) is a
cell. For example. I have these three columns:
Northern Europe, United Kingdom (Estimate); Northern Europe, United
Kingdom (Lower); Northern Europe, United Kingdom (Upper); in cells, say
A1, A2, A3. I want to delete A2 and A3 and all of the information below
them (the values for particular states).

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com