Couple of queries re macros (end of data / delete row if...)

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi,

firstly when using the basic record a macro feature, I often want to
select the entire range for sorting / formating etc. The problem is
if any of the fields are blank, you can end up pressing end | down
several times, and this is no good for changing data. So question is,
is there a way of doing this via the record a macro screen, or is
there some code I can paste into my existing macro?

Secondly, how do I get a macro to check the contents of column N, and
if it contains the words "Loaded at Site", delete the entire row and
resort the spreadsheet.

Thanks in advance.
 
You could use a dynamic range but this would need one of the columns to be
contiguously filled...

=OFFSET(Solo!$C$5,0,0,COUNT(Solo!$C$5:$C$350),4)

Define a new name and put the above into the refers to box. Change the name
of the sheet and the range references.

Providing the first column is filled, the formula will select the range
specified.

This has saved me loads of problems - I found it in the KnowledgeBase in MS
Support.

Have fun!! Jim
 
Back
Top