Here is the code I use in the worksheet object. You double click to insert a line below the selected line.
VB:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LR As Integer
If Target.Column > 1 Then Exit Sub
Cancel = True
If MsgBox("Do you want to insert a new row below this row?", vbYesNo) = vbYes Then
With Target
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(0, 14)).Select
Selection.Offset(1).Insert shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Exit Sub
If you like these VB formatting tags please consider sponsoring me in support of injured Royal Marines
That part works... however in column's E, J and M and N I have the following that won't copy and fill down accordingly...
E - Formula
J - Conditional Format
M - Formula
N - Data Validation
The formula's are as follows
E - =IF(ISBLANK(D10),(""),ROUNDDOWN((MINUTE(V10)-MINUTE(T10))/60,1))
M - =IF(ISBLANK(R10),(""),(CONCATENATE(R10,"",W10)))
The conditional format in J a
If the cell value = "REP" then Orange text applies to =$J$10
If the cell value = "REC" then Red text applies to = $J$10
The Data validation in N is based off of cell M (a formula)
The data validation is "allow list" and source is "=INDIRECT($M$10)"
How do I copy these to the new lnserted line and then fill down to the end of my document, which will be no further than Row 150?
When I insert a line, the formula for instance in M goes like this
Line Above - =IF(ISBLANK(R10),(""),(CONCATENATE(R10,"",W10)))
Inserted Line - (blank nothing there)
Line Below - =IF(ISBLANK(R11),(""),(CONCATENATE(R11,"",W11)))
I need it to fill this way.. for this column
Line Above - =IF(ISBLANK(R10),(""),(CONCATENATE(R10,"",W10)))
Inserted Line - =IF(ISBLANK(R11),(""),(CONCATENATE(R11,"",W11)))
Line Below - =IF(ISBLANK(R12),(""),(CONCATENATE(R12,"",W12)))
I hope I explained it well enough... basically I want to insert a line, and it copy and fill down the data accordingily...
thanks in advance!!