Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Annoying delete empty rows question

Hi there - please forgive the newbie question, I've been searching
around on these boards for an answer and nothing seems to quite fit.

Scenario:-
I have a worksheet template (although not an .xlt file) that multiple
people will be using as a basis to add their own data into. (i.e. the
amount of data varies per workbook).

I want to make sure that people don't leave blank rows (based on at
least 2 columns of info).

So - I have been going down the autofilter route, and I get to the
point where I have all the blank rows based on 2 columns displayed
fine.

My question is - how can I automate the selection of a variable amount
of blank rows to delete them?

Ideally I would love a VBA solution, as I'll have approx 18
spreadsheets to complete this on at least 2 or 3 times a week...
URGH!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Annoying delete empty rows question

look in vba help for specialcells

"Tamsen" wrote in message
om...
Hi there - please forgive the newbie question, I've been searching
around on these boards for an answer and nothing seems to quite fit.

Scenario:-
I have a worksheet template (although not an .xlt file) that multiple
people will be using as a basis to add their own data into. (i.e. the
amount of data varies per workbook).

I want to make sure that people don't leave blank rows (based on at
least 2 columns of info).

So - I have been going down the autofilter route, and I get to the
point where I have all the blank rows based on 2 columns displayed
fine.

My question is - how can I automate the selection of a variable amount
of blank rows to delete them?

Ideally I would love a VBA solution, as I'll have approx 18
spreadsheets to complete this on at least 2 or 3 times a week...
URGH!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Annoying delete empty rows question

SpecialCells works fine if I am selecting rows to delete based on a
criteria of a blank cell in 1 column, as soon as I try to make this
judgement based on 2 columns it does not work.

Data format is such

Row 1 Column A Column B Column C
Row 2 data data
Row 3 data data
Row 4
Row 5 data data data
Row 6 data data

So I'm doing an auto filter on Column A and Column B to look for
blanks in the 2 columns ONLY - and then figure out how to select those
rows. In the example above, I want it to delete Row 4 only.

OR - I use the SpecialCells suggestion below:-
Columns("A:B").Activate
Cells.SpecialCells(xlCellTypeBlanks).EntireRow.Del ete - this is the
line that does not work. I get a run time error "'1004' - cannot use
that command on overlapping sections'.

If I change the above to say just Columns("A:A") or ("B:B") it does
delete based on that criteria, but doesn't work for my purposes (it
deletes row 4 and row 3, or row 4 and row 6.)

Still a newbie, and still need some guidance :(

Many thanks in advance
"Don Guillett" wrote in message ...
look in vba help for specialcells

"Tamsen" wrote in message
om...
Hi there - please forgive the newbie question, I've been searching
around on these boards for an answer and nothing seems to quite fit.

Scenario:-
I have a worksheet template (although not an .xlt file) that multiple
people will be using as a basis to add their own data into. (i.e. the
amount of data varies per workbook).

I want to make sure that people don't leave blank rows (based on at
least 2 columns of info).

So - I have been going down the autofilter route, and I get to the
point where I have all the blank rows based on 2 columns displayed
fine.

My question is - how can I automate the selection of a variable amount
of blank rows to delete them?

Ideally I would love a VBA solution, as I'll have approx 18
spreadsheets to complete this on at least 2 or 3 times a week...
URGH!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hpw do I delete multiple empty rows found between filled rows? Bill Excel Worksheet Functions 2 November 15th 09 07:12 PM
delete empty rows aditya Excel Discussion (Misc queries) 1 June 3rd 09 12:58 PM
Delete Empty Rows JCG Excel Discussion (Misc queries) 4 December 18th 07 11:31 AM
How to Delete empty rows in excel in b/w rows with values Dennis Excel Worksheet Functions 3 August 28th 07 04:15 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"