Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Relative Refs



Hi there,

Using VB, I want to tell Excel to got cell b10, which is easy enough
(Application.Goto Reference:="R10C2") ! but I then want to tell it to
move ONE cell down (One cell down is not B11 as its a filtered list so
next cell will change depending on results of filter...

Thanks!!!

Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Relative Refs

One way -

Sub test()
Dim i As Long
Dim rng As Range

For i = 10 To Rows.Count
If Not Rows(i).Hidden Then
Set rng = Cells(i, 2)
Exit For
End If
Next

If Not rng Is Nothing Then
Application.Goto rng
End If

End Sub

Regards,
Peter T

"Darin Kramer" wrote in message
...


Hi there,

Using VB, I want to tell Excel to got cell b10, which is easy enough
(Application.Goto Reference:="R10C2") ! but I then want to tell it to
move ONE cell down (One cell down is not B11 as its a filtered list so
next cell will change depending on results of filter...

Thanks!!!

Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Relative Refs

HI Peter,

Thanks - this takes me to the last row in the range, which is blank - I
want it to take me to the first row with data in it - which I know will
always be one line beneath row 10, column 2 (In prev eg I know I used
used b1, but its actually B10)....

Thanks!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Relative Refs

Hi Darren,

I'm confused, I thought you wanted to 'goto' the first cell including or
below B10 that is not in a (filtered) hidden row. In light testing that's
what the macro did.

which I know will
always be one line beneath row 10, column 2


so why not go directly to B11, guess I'm not following.

Regards,
Peter T

"Darin Kramer" wrote in message
...
HI Peter,

Thanks - this takes me to the last row in the range, which is blank - I
want it to take me to the first row with data in it - which I know will
always be one line beneath row 10, column 2 (In prev eg I know I used
used b1, but its actually B10)....

Thanks!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Relative Refs



Works fine - my apologies Peter - I changed it to fit my situation but
changed it incorrectly! Now that Ive fixed my error, your piece of
brilliance works like a charm!

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***
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
SUMPRODUCT or SUMIF and INDIRECT, with Relative cell refs Greg in CO[_2_] Excel Worksheet Functions 5 September 15th 08 04:41 PM
Excel: Mass change relative cell refs to absolute (more than F4) aduchnow Excel Programming 2 May 13th 06 04:51 AM
How use name refs for Source Data? [email protected] Charts and Charting in Excel 1 April 18th 06 08:56 AM
Sheet Refs in Add-In Ian Excel Programming 4 April 28th 05 07:58 PM
Variable Cell Refs Craig[_15_] Excel Programming 2 April 28th 04 04:04 PM


All times are GMT +1. The time now is 07:23 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"