Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simple, but having the hardest time...
Need to go to first available cell in column A, then clear contents of all columns to the right and rows below. (Thought I was getting good at this, but got stuck assembling this one for some reason). |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Define more clearly what you mean by 'First available cell in Column A' Mike "J.W. Aldridge" wrote: Simple, but having the hardest time... Need to go to first available cell in column A, then clear contents of all columns to the right and rows below. (Thought I was getting good at this, but got stuck assembling this one for some reason). |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Define more clearly what you mean by 'First available cell in Column A'
Good point Mike This will select the first empty cell in A This is not always the cell below the last cell with data in A Sub test() On Error GoTo BodemUp Columns("A").Cells.SpecialCells(xlCellTypeBlanks). Cells(1).Select Exit Sub BodemUp: Cells(Rows.Count, "A").End(xlUp)(2).Select End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mike H" wrote in message ... Hi, Define more clearly what you mean by 'First available cell in Column A' Mike "J.W. Aldridge" wrote: Simple, but having the hardest time... Need to go to first available cell in column A, then clear contents of all columns to the right and rows below. (Thought I was getting good at this, but got stuck assembling this one for some reason). |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This one takes me to the last cell used.
I need the cursor to go to the next empty cell. Then clear everything to the right and below. Range("A2").Select Selection.End(xlDown).Select |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In which case it sounds like you want this FirstRow = Range("A2").End(xlDown).Row lastrow = Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious).Row Rows(FirstRow & ":" & lastrow).EntireRow.ClearContents Mike "J.W. Aldridge" wrote: This one takes me to the last cell used. I need the cursor to go to the next empty cell. Then clear everything to the right and below. Range("A2").Select Selection.End(xlDown).Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Programming | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) |