View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Desert Piranha[_11_] Desert Piranha[_11_] is offline
external usenet poster
 
Posts: 1
Default Last used cell in column with shading


Hi Norman,
I added line 3 & 4 to the macro, so as to toggle, But on the column
it does not go to the cell
directly below the pattern/value. Instead it goes way down the colum
to a unrelated cell.
There are formulas in other columns on the page and i think its goin
down past those,
not stoping at the Pattern/Value in Column P
(Sorry i am not good at explaining)
Sub TopBottomToggle5()
If ActiveCell.Address < "$G$5" Then
Range("G5").Select
Else
Intersect(Cells.SpecialCells(xlCellTypeLastCell). _
EntireRow, Columns("P")).Select
End If
End Sub

Norman Jones Wrote:
Hi Dave,
Try:

'============
Sub TopBottomToggle5()
If ActiveCell.Address < "$G$5" Then
Intersect(Cells.SpecialCells(xlCellTypeLastCell). _
EntireRow, Columns("P")).Select
End If
End Sub
'<<============

---
Regards,
Norman


"Desert Piranha"
wrote in
messag
news:Desert.Piranha.1zmpwc_1133890504.816@excelfor um-nospam.com...

Hi Norman,
Its the " PseudoBarChart" code that you wrote for me, where it will
populate the cells in a range,
with a pattern from the last used row, up to the last used cell in
another column. whew!
That make sense? want me to post it?Norman Jones Wrote:
Hi Dave,

What logic does the other macro use to shade cells?

---
Regards,
Norman



"Desert Piranha"
<Desert.Piranha.1zmoqn_1133889009.0547@excelforu m-nospam.com wrot

in
message
news:Desert.Piranha.1zmoqn_1133889009.0547@excelfo rum-nospam.com...

Hi all,
I use this to toggle from a cell on top of the sheet,
to the cell, one below the last used cell in Col P.

Code:
--------------------
Sub TopBottomToggle5()
If ActiveCell.Address < "$G$5" Then
Range("G5").Select
Else
Range("P65536").End(xlUp).Offset(1, 0).Select
End If
End Sub

--------------------
It works as it should. My twist is that, in Column P there may b

a
pattern in the cells below the last used cell.
The pattern is variable as far as the number of cells below th

last
used cell it will populate.
The pattern is put there by another macro, using
Code:
--------------------
Interior.Pattern = xlPatternGray8
--------------------
not conditional formating.
I am trying to make the above macro go to the "last used cell in
Column
P which includes if the cell has a pattern in it.
So say, P1:P10 have values and P11:P15 have the pattern, then my
active
cell address should be P16.

Any direction appreciated.


--
Desert Piranha




------------------------------------------------------------------------
Desert Piranha's Profile:
http://www.excelforum.com/member.php...o&userid=28934
View this thread:
http://www.excelforum.com/showthread...hreadid=491114



--
Desert Piranha



------------------------------------------------------------------------
Desert Piranha's Profile:
http://www.excelforum.com/member.php...o&userid=28934
View this thread

http://www.excelforum.com/showthread...hreadid=491114


--
Desert Piranh

-----------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2893
View this thread: http://www.excelforum.com/showthread.php?threadid=49111