Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Last cell in range of formulas not equal to blank

I have a range: A1:E10. Every cell in this range has a formula in it that
looks in other sheets and makes calculations. If the cell value is 0 it
leaves the cell blank.

I want to find the last cell (bottom right) in this range that does not
equal "blank".

Help.



--
Thanks
Shawn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Last cell in range of formulas not equal to blank

Sub find_it()
mesage = ""
Set r = Range("A1:E10")
For Each rr In r
If rr.Value = "" Then
Else
mesage = rr.Address
End If
Next
MsgBox (mesage)
End Sub

--
Gary''s Student - gsnu200775


"Shawn" wrote:

I have a range: A1:E10. Every cell in this range has a formula in it that
looks in other sheets and makes calculations. If the cell value is 0 it
leaves the cell blank.

I want to find the last cell (bottom right) in this range that does not
equal "blank".

Help.



--
Thanks
Shawn

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Last cell in range of formulas not equal to blank

Thank you. Can you help me one step farther? I want to go to that cell and
select the range A1: that cell???
--
Thanks
Shawn


"Gary''s Student" wrote:

Sub find_it()
mesage = ""
Set r = Range("A1:E10")
For Each rr In r
If rr.Value = "" Then
Else
mesage = rr.Address
End If
Next
MsgBox (mesage)
End Sub

--
Gary''s Student - gsnu200775


"Shawn" wrote:

I have a range: A1:E10. Every cell in this range has a formula in it that
looks in other sheets and makes calculations. If the cell value is 0 it
leaves the cell blank.

I want to find the last cell (bottom right) in this range that does not
equal "blank".

Help.



--
Thanks
Shawn

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Last cell in range of formulas not equal to blank

We can do either, but I don't know how to do both at the same time. This
will select the Found cell:

Sub find_it()
mesage = ""
Set rGoTo = Range("A1")
Set r = Range("A1:E10")
For Each rr In r
If rr.Value = "" Then
Else
mesage = rr.Address
Set rGoTo = rr
End If
Next
rGoTo.Select
End Sub

This version selects the area from A1 thru the Found cell:

Sub find_it()
mesage = ""
Set rGoTo = Range("A1")
Set r = Range("A1:E10")
For Each rr In r
If rr.Value = "" Then
Else
mesage = rr.Address
Set rGoTo = rr
End If
Next
Range("A1:" & mesage).Select
End Sub
--
Gary''s Student - gsnu200775


"Shawn" wrote:

Thank you. Can you help me one step farther? I want to go to that cell and
select the range A1: that cell???
--
Thanks
Shawn


"Gary''s Student" wrote:

Sub find_it()
mesage = ""
Set r = Range("A1:E10")
For Each rr In r
If rr.Value = "" Then
Else
mesage = rr.Address
End If
Next
MsgBox (mesage)
End Sub

--
Gary''s Student - gsnu200775


"Shawn" wrote:

I have a range: A1:E10. Every cell in this range has a formula in it that
looks in other sheets and makes calculations. If the cell value is 0 it
leaves the cell blank.

I want to find the last cell (bottom right) in this range that does not
equal "blank".

Help.



--
Thanks
Shawn

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
when setting a cell to equal a blank cell it displays 0 BWildeRed Excel Worksheet Functions 2 January 5th 10 07:04 AM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Blank (empty) cell always equal to 0?? ulfah Excel Discussion (Misc queries) 3 February 1st 06 04:55 PM
Macro to copy range of formulas to equal data lines lh Excel Worksheet Functions 2 August 15th 05 04:37 PM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 06:57 AM


All times are GMT +1. The time now is 01:13 PM.

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"