LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I calculate an offset between two ranges?

x and y are single column ranges of the same size. How do I retrieve
the corresponding values to x & from y as I loop through x? See
example below and thanks for any help.

Function offset(x As Range, y As Range, test As String)

For Each icell In x
If icell.Value = test Then
' I want to use the value of the corresponding element of range y here
End If
Next

End Function

--
Mo
 
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
Dynamic Ranges and Offset RFJ Excel Worksheet Functions 3 August 29th 06 03:20 PM
Offset function and Dynamic Ranges SandyLACA Excel Discussion (Misc queries) 2 August 2nd 06 11:07 PM
Using Offset with named ranges StanJ Excel Worksheet Functions 5 September 2nd 05 09:07 AM
Macro showing Offset instead of Ranges Diane Thorpe Excel Programming 2 June 6th 05 09:03 PM
Ranges using offset Fatir Zelen Excel Programming 11 April 24th 04 11:15 PM


All times are GMT +1. The time now is 04:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"