View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
moonhk[_2_] moonhk[_2_] is offline
external usenet poster
 
Posts: 36
Default How to using Address in selected Range

Hi All

In below part of VBA, I am using offset to build k1 value. How to
using range("B" & row_value) replace offset (0,1) ?

Dim rngToSearch As Range, rngToCheck As Range
Dim SchShtRange As String
Dim SchShtName As String
Dim k1 As String

SchShtRange = "A1:A5"

SchShtName = "RangeA"

Set rngToSearch = Sheets(SchShtName).Range(SchShtRange) 'change to
suit

For Each c In rngToSearch
If c.Value < "" Then
k1 = c.Value + "|" & c.Offset(0,1).Value
...