Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Range Manipulation Question

Dear All

I have a worksheet with 3 columns (see below). I need to cycle through
the data and for each group of rows with the same value in column 1, I
perform a stepwise linear interpolation to determine the value in Col3
corresponding to a value of 30 in Col2. I have a function set up for
the interpolation, but I am stuck on the code for cycling through the
range? Any help would be much appreciated.

Thanks
Matt

Col1 Col2 Col3
BH-01 14.8 0.08
BH-01 28.5 0.85
BH-01 42.1 2
BH-01 82.4 19
BH-01 100 38.1
BH-02 14.9 0.08
BH-02 24.2 0.85
BH-02 34.7 2
BH-02 50.7 4.75
BH-03 22.4 0.08
BH-03 31.6 0.15
BH-03 41.2 0.25
BH-03 56.4 0.43
BH-03 81.8 0.85

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Range Manipulation Question

Hopefully, this will give you a start:

Sub Get_Group_Values()
Dim c As Object
Dim rng As Range
'select your range, example:
Range("A2:A15").Select
For Each c In Selection
If c.Value = c.Offset(1, 0).Value Then
'get Col B values, ex B = c.offset(0,1).value
'get col C values, ex C = c.offset(0,2).value
Else
'process your gathered data for that group
End If
Next c
End Sub

-Glenn Ray


" wrote:

Dear All

I have a worksheet with 3 columns (see below). I need to cycle through
the data and for each group of rows with the same value in column 1, I
perform a stepwise linear interpolation to determine the value in Col3
corresponding to a value of 30 in Col2. I have a function set up for
the interpolation, but I am stuck on the code for cycling through the
range? Any help would be much appreciated.

Thanks
Matt

Col1 Col2 Col3
BH-01 14.8 0.08
BH-01 28.5 0.85
BH-01 42.1 2
BH-01 82.4 19
BH-01 100 38.1
BH-02 14.9 0.08
BH-02 24.2 0.85
BH-02 34.7 2
BH-02 50.7 4.75
BH-03 22.4 0.08
BH-03 31.6 0.15
BH-03 41.2 0.25
BH-03 56.4 0.43
BH-03 81.8 0.85


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Range Manipulation Question

Thank you Sir, I'm headed in the right direction now.

Matt

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
Value manipulation Vic Excel Discussion (Misc queries) 3 April 3rd 09 03:18 PM
data manipulation question Blaster Master Excel Worksheet Functions 3 March 22nd 07 08:39 PM
csv manipulation question fally Excel Discussion (Misc queries) 1 October 9th 05 12:58 PM
Date manipulation question NikkoW Excel Programming 2 May 14th 04 04:17 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


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