Hi Bos ? Can u help me again please.
How to Find a string and then insert new row above the SUM Formula ?
I have attached the Example file (Example.xls)
thanks b4
Hi Bos ? Can u help me again please.
How to Find a string and then insert new row above the SUM Formula ?
I have attached the Example file (Example.xls)
thanks b4
Hi, Try this:-
Regards Mick![]()
Sub MG23Nov03 Dim txt As String Dim Rng As Range, Dn As Range On Error Resume Next txt = Application.InputBox(prompt:="Please Select ", Title:="Insert Brackets", Type:=2) If txt = "" Then Exit Sub Set Rng = Range(Range("f6"), Range("f" & Rows.Count).End(xlUp)) For Each Dn In Rng If Dn.Offset(, -2) = txt Then Dn.Offset(1).EntireRow.Insert Dn.Offset(2).Formula = "= sum(" & Dn.Address(0, 0) & ":" & Dn.Offset(1).Address(0, 0) & ")" End If Next Dn End Sub End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks