Home > Forum Home > Automating Data Analysis Tasks > Looping Query using value from next cell > Dynamic ranges and offsets Share

Dynamic ranges and offsets

Excel Help for Dynamic Ranges And Offsets in Automating Data Analysis Tasks


Forum TopicLogin

Dynamic Ranges And Offsets

Rate this:
(3/5 from 1 vote)
ConfusedYou can loop down a selection using dynamic ranges and cell offset to get the value from the next cell.  For example:

VBA Code:
Dim curcell As Variant
Dim nxtval As Variant 
Range("I5").Select
Range(ActiveCell, Selection.End(xlDown)).Select
For Each curcell in Selection
  nxtval = curcell.offset(1,0).value 
Next 
 Excel Business Forums Administrator
 Posted by on
 
View Full Post

Find relevant Excel templates and add-ins for Dynamic ranges and offsets in the