Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

clear from current cell down not up

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

839 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