Excel Puzzle

T

Templar

Two Inquires

First: Is there a shortcut for me to be able to delete every other line in
an excel
document. The information on every other line (3,5,7,9 etc) is redundant
and I'd hate to have to delete them line by line.

Second: When I delete the redundant line, some data from the main line
disappears too. I can't have that happen. (that is, if I delete line 3,
some important
data on line 2 disappears)

Please advise. Thank you.
 
G

Gord Dibben

In a helper column adjacent to your data range in row 1 enter xxxxx, in row 2
enter 0, in row 3 enter 1

Select 0 and 1 cells then right-click and drag down as far as you need.

Release button and "Copy Cells".

Select the column and Data>Filter>Autofilter on the 1.

Select the visible cells and delete>entire row.

Then Data>Filter>Autofilter to disable and see just the even rows remaining.

Losing data in row 2 when you delete row 3 sounds like you maybe have merged
some cells?


Gord Dibben MS Excel MVP
 
P

Pete_UK

Further to Gord's reply, if you have formulae in even rows that refer to
cells in odd rows then these will show #REF errors after you remove the odd
rows.

Pete
 
G

Gord Dibben

Thanks Pete.

I forgot to mention that(did not think about it) and did not tell OP to first
make a backup.

Hope he didn't get too far if there were formulas<g>


Gord
 
T

Templar

I've made backups. Something is not working right at all. I've tried it 20
times
I insert a new column as the first column
I enter xxxxxx on the title line
I enter 0 on line 2 and 1 on line three
Nothing happens when I right click, but when I left click I can drag all the
way
down to the final line entry (5,600) and they are properly highlighted.
I right click and hit copy
And then I get to authofilter.
An arrow box appears at the first entry of every column
But nothing happens.

By the way, if some cells are improperly merged in this database, is there
an easy command to delete the merge command?
 
G

Gord Dibben

Seleting A2 and A3 and left-click dragging will probably increment the numbers
to o,1,2,3,4,5,etc.

That's why I mentioned selecting A2 and A3 then right-click and drag then
release the button and "Copy Cells".

Or you could select A2 and A3 then select from A4 to A5600 and Edit>Paste

Whichever method you use....................

Do you have alternating 0's and 1's in A2:A5600?

If so, then you select the autofilter dropdown arrow in A1 and select 1 from the
choices.

All the rows with 0 should disappear and the rows with 1 will remain.

Select what's left from A2 downwards then Edit>Delete>Entire Row.

Now remove the Autofilter to see just the rows with 0 plus the top row.

To unmerge cells, Format>Cells>Alignment. Uncheck "merge cells".


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top