![]() |
#4
|
||||
|
||||
![]()
If you use the selection object it isn't too complex.
Code:
Sub GetUp() Dim aCell As Cell, aRng As Range Set aRng = Selection.Range Selection.Range.Cells(1).Select Selection.MoveUp If Selection.Range.Cells.Count = 1 Then Debug.Print Selection.Range.Cells(1).Range.Text Else Debug.Print "No cells immediately above selection" End If aRng.Select 'restore selection End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Marcia | Excel | 6 | 05-12-2020 06:21 PM |
Want a quotient using a constant to show up in column c each time a number is added to column b | fibbermcghee | Excel | 2 | 12-09-2014 05:48 PM |
![]() |
MS baby | Project | 1 | 06-03-2014 02:43 PM |
![]() |
highbids | Outlook | 1 | 08-23-2010 04:10 PM |
![]() |
paulrm906 | Excel | 1 | 12-05-2008 07:51 PM |