Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a formula that looks at the value of another cell and usesthat value as the row value for for a referenced cell Kerry[_2_] Charts and Charting in Excel 2 March 16th 10 12:29 AM
Creating cell names from cell contents en masse John[_26_] Excel Worksheet Functions 1 May 15th 09 02:41 AM
Creating a separate cell entry for every individual line in a cell DaveyC4S Excel Discussion (Misc queries) 4 March 15th 07 05:15 PM
creating cell references [email protected] Excel Discussion (Misc queries) 3 November 3rd 06 06:18 PM
creating a file name from a cell Lee Stiles Excel Discussion (Misc queries) 2 February 23rd 06 11:28 PM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"