Hello
In my attached sample workbook I have data in column B & D.
I wan
1) IF I select Cell A1 the my formula should shoot down from A1 to A& last row with data of the column B
And If
2) I select C1 then the my formula should shoot down from C1 to C& last row with data of the column C
I am using bellow code but it is doing something very strange
Sub FillFormula()
Dim ws As Worksheet
Dim irow As Long
Set ws = Sheets("sheet1")
irow = ws.Cells(ws.Rows.Count, ActiveCell.Column + 1).End(xlUp).Row
Range(ActiveCell.Column & ActiveCell.Row & ":" & ActiveCell.Column & irow).Formula _
= "=1+1"
End Sub
Thanks in advance
Imran Bhatti
Bookmarks