Solved

clear from current cell down not up

Posted on 2016-11-17
2
11 Views
Last Modified: 2016-11-17
I am using below code when I open file which works fine if there is data but if there is no data in cell B10 it deletes the header row which in in row 9. Can this code be amended to only delete from B10 down and if there is no data in cell do nothing.

Sheets("DD MMM").Range(Range("B10"), Cells(Rows.Count, "M").End(xlUp)).Select

Thanks in advance
0
Comment
Question by:Jagwarman
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41891559
Hi,

pls try

Sheets("DD MMM").Range(Range("B10"), Cells(10, "M").End(xlDown)).Select

Open in new window

Regards
0
 

Author Closing Comment

by:Jagwarman
ID: 41891574
Thanks Rgonzo. I'm gonna miss you :-)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

705 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now