Solved

clear from current cell down not up

Posted on 2016-11-17
2
14 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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

863 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

25 Experts available now in Live!

Get 1:1 Help Now