Referring to a cell without using Offset
I am sorry but I forgot to add a very important part, I am using a For...
Each... Next statement. My goal is: for very cell in Range("D2:D5") say, I
want to assign the values in column A, B and C of the same row to different
cells in another worksheet, for eaxmple using the following snippet of code:
For Each rc In marketWS.Range(hdrColumn & "5:" & hdrColumn &
marketWSlastRow).Cells
If rc.Interior.ColorIndex = 3 Then
pastdueWS.Range("A" & pastdueWS_currRow) = rc.Offset(0,
marName)
pastdueWS.Range("B" & pastdueWS_currRow) = rc.Offset(0, NLP)
pastdueWS.Range("C" & pastdueWS_currRow) = rc.Offset(0, -1)
pastdueWS.Range("D" & pastdueWS_currRow) = rc.Offset(0,
candID)
pastdueWS.Range("E" & pastdueWS_currRow) = milestoneTitle
pastdueWS.Range("G" & pastdueWS_currRow) = "p"
pastdueWS_currRow = pastdueWS_currRow + 1
End If
Next rc
I want to replace the rc.Offset with something more general.
"Jacob Skaria" wrote:
Do you mean the first column of the row. If then
Cells(activecell.Row,1)
OR
Cells(activecell.Row,"A")
Or
Range("A" & Activecell.row)
If this post helps click Yes
---------------
Jacob Skaria
"Ayo" wrote:
Is there another way to refer to a cell that is in the same row and Column A
of the active cell. For example, let say Range("D8") is my activecell and I
want to refer to Range("A8"), how do I do that without using c.Offset(0,-3).
Thanks
Ayo
|