Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a NUL Cell
Hi:
Excell 2000! I need to do something simple, so that i can find the bottom of a range. I have a range from a1 to c1000, all of which have formlae in them. I would like to be able to set them to null (NOT SPACE OR ""), when a specific conditions exists. I want to be able to do a Range("A1").Select Selection.End(xlDown).Select iRow = ActiveCell.Row iColumn = ActiveCell.Column Cells(iRow, iColumn+3).Select to select all the cells that have an entry, since cell entry will go from top to bottom. This code unfortunately selects ALL the cells in the a1:c1000 range (since they all have the formula in them). I tried extracting cells that had non space entries and that didn't work either. Help!!! John Baker |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a NUL Cell
John
I think you'll have to loop through column A until you get to a "blank" cell. Try this Sub GetRange() Dim Rng As Range Dim cell As Range Dim lRow As Long For Each cell In Range("a1", Range("a1").End(xlDown)).Cells If cell.Value < "" Then lRow = cell.Row Else Exit For End If Next cell Set Rng = Range("a1", "c" & lRow) MsgBox Rng.Address End Sub -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "John Baker" wrote in message ... Hi: Excell 2000! I need to do something simple, so that i can find the bottom of a range. I have a range from a1 to c1000, all of which have formlae in them. I would like to be able to set them to null (NOT SPACE OR ""), when a specific conditions exists. I want to be able to do a Range("A1").Select Selection.End(xlDown).Select iRow = ActiveCell.Row iColumn = ActiveCell.Column Cells(iRow, iColumn+3).Select to select all the cells that have an entry, since cell entry will go from top to bottom. This code unfortunately selects ALL the cells in the a1:c1000 range (since they all have the formula in them). I tried extracting cells that had non space entries and that didn't work either. Help!!! John Baker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
creating a formula that looks at the value of another cell and usesthat value as the row value for for a referenced cell | Charts and Charting in Excel | |||
Creating cell names from cell contents en masse | Excel Worksheet Functions | |||
Creating a separate cell entry for every individual line in a cell | Excel Discussion (Misc queries) | |||
creating cell references | Excel Discussion (Misc queries) | |||
creating a file name from a cell | Excel Discussion (Misc queries) |