Re: Referenced value in a cells in 5 rows
Hi Maqbool:
Thnx for your reply, the code is now working all right....
But just one last help.... I want to shift the columns, where it is printed to another 2-3 columns, I tried a whole day, but could not get it right, somewhere it gets screwed up, I am attaching your part of the code...
'For printing the Recurr additional Value
If Target.Column <> 2 Or Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "M + R" Or Target.Row = 3 Then
Set rngtoFill = Range(Target.Offset(0, 5), Target.Offset(5, 5))
chkData = Application.WorksheetFunction.Count(rngtoFill)
If chkData = 0 Then
MsgBox ("chkData")
rngtoFill.Value = Worksheets("Interest Calculations").Range("F4").Value
Else
MsgBox ("1st Else")
If Target.Offset(0, 6).Value = "" Then
MsgBox ("Inside If")
lstCol = Target.Offset(0, 6).Column
Range(Cells(Target.Row, lstCol), Cells(Target.Row + 5, lstCol)).Value = Worksheets("Interest Calculations").Range("F4").Value
Else
MsgBox ("2nd Else")
lstCol = Target.Offset(0, 5).End(xlToRight).Column
Range(Cells(Target.Row, lstCol + 1), Cells(Target.Row + 5, lstCol + 1)).Value = Worksheets("Interest Calculations").Range("F4").Value
End If
End If
End If
Display More
Please help....
Regards
Ravin