somail
11-04-2011, 03:33 PM
Hi everyone, I am back for more help.
Here is what I am trying to do:
1. Search through a range starting from (B3: User_defined) and look for a blank cell. The range will not be any more than 400 rows by 10 columns. (The Loop for this works already, but if you know something more efficient feel free to suggest)
2. When a blank cell is found I want that row and all rows below it to be deleted. (This includes all cells in and out of the ealier defined range). The variable "CellCount" already tells me which cell is empty, I just need to translate that into a row.
3. I then want the row number to be saved into another variable "RowNumber" so I can keep track of everything.
Sub RowFormat()
Dim CellCount As Integer
Dim RowNumber AS Integer
Do Until Worksheets("Prices New").Range(Cells(3, 2), Cells(400, StockNum + 1)).Cells(CellCount) = ""
CellCount = CellCount + 1
Loop
End Sub
As always, Thank you for your help.
Here is what I am trying to do:
1. Search through a range starting from (B3: User_defined) and look for a blank cell. The range will not be any more than 400 rows by 10 columns. (The Loop for this works already, but if you know something more efficient feel free to suggest)
2. When a blank cell is found I want that row and all rows below it to be deleted. (This includes all cells in and out of the ealier defined range). The variable "CellCount" already tells me which cell is empty, I just need to translate that into a row.
3. I then want the row number to be saved into another variable "RowNumber" so I can keep track of everything.
Sub RowFormat()
Dim CellCount As Integer
Dim RowNumber AS Integer
Do Until Worksheets("Prices New").Range(Cells(3, 2), Cells(400, StockNum + 1)).Cells(CellCount) = ""
CellCount = CellCount + 1
Loop
End Sub
As always, Thank you for your help.