Worksheet Change

I

info

Hello,

I have a bit of a problem with my worksheet_Change event. I was hoping
someone could help me work it out. The following code works great if a
single cell's value is changed. But if I copy data and then paste it the
code does not function right. It carries a value of "" for each cell in
target.:

Any ideas would be great...

Thanks,
Ernst.

***Code***

strQuote = Chr(34)

ForEach C in Target

MoveData:

Select Case C.Column

Case 22
strCol = "V"
Case 23
strCol = "W"
Case Else
GoTo ThereIsAnError
End Select

intCol = Cells(5, C.Column).Value
intRow = Cells(C.Row, 25).Value

Worksheets("Manager Raw Data").Cells(intRow, intCol).Value = C.Value

C.Formula = "=IF(INDIRECT(" & strQuote & "'Manager Raw Data'!" & _
strQuote & "& ADDRESS($Y" & Target.Row & "," & strCol & "$5))=" & _
strQuote & strQuote & "," & strQuote & strQuote & ",INDIRECT(" & _
strQuote & "'Manager Raw Data'!" & strQuote & " & ADDRESS($Y" & _
Target.Row & "," & strCol & "$5)))"

Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top