Help with link
Hi Dave. Glad to see you are around :)
I've tried your changes and still not linking. Is not even taking the value
of c...
Any ideas?
"Dave Peterson" wrote:
Maybe:
Option Explicit
Sub testme01()
Dim c As Range
Dim lastC As String
Dim i As Long
Dim DestRow As Long
Dim DestCol As Long
'testing only
lastC = "E"
i = 3
DestRow = 3
DestCol = 18
For Each c In Range(ActiveCell.Offset(0, 3), Cells(i + 15, lastC))
If c.Interior.ColorIndex = 8 Then
With Cells(DestRow, DestCol + 1)
.Value = c.Value
'I need to link the destination cell with c.value
.NumberFormat = "0.000"
'or maybe???
.NumberFormat = c.NumberFormat
.Interior.ColorIndex = 8
End With
End If
Next c
End Sub
gaba wrote:
Hi,
I need some help with copying and pasting special (link) the value of one
cell into another.
This is part of the code that I'm using. I've tried almost everything with
the link and is not working
For Each c In Range(ActiveCell.Offset(0, 3).Address, lastC & i + 15)
If c.Interior.ColorIndex = 8 Then
Cells(DestRow, DestCol + 1).Value = c.Value
'I need to link the destination cell with c.value
Cells(DestRow, DestCol + 1).NumberFormat = "0.000"
Cells(DestRow, DestCol + 1).Interior.ColorIndex = 8
End If
Next
Any help would be more than appreciated.
Thanks
--
gaba :)
--
Dave Peterson
|