Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
when setting a cell to equal a blank cell it displays 0 | Excel Worksheet Functions | |||
Average Formula to display blank cell if named range is blank | Excel Worksheet Functions | |||
Blank (empty) cell always equal to 0?? | Excel Discussion (Misc queries) | |||
Macro to copy range of formulas to equal data lines | Excel Worksheet Functions | |||
make cell contents equal to null value - not blank, but empty | Excel Worksheet Functions |