View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Last used cell in column with shading

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 wrote 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 be a
pattern in the cells below the last used cell.
The pattern is variable as far as the number of cells below the 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