Dim x As Long Cancel = True 'turn off Edit, mode applicable to "Edit directly in a cell" x = Active Sheet.
Checking will be from current row and from next row in a separate macro that calls Insert Rows And Fill Formulas. Has Formula Private Sub Worksheet_Before Double Click(By Val Target As Range, Cancel As Boolean) '-- Code example to prevent reinserting if the current row '-- or next row row has Column A cel empty (testing with TRIM). Count 'may alleviate some lastcell problems Target.
Just make sure that your number is not larger than your criteria.
Column)) = "" Then Msg Box "skipping due to formula in column C and nothing in Column A --testing" Exit Sub End If Application. Mc Ritchie, 2007-05-11, not posted Cancel = True Target. The trick is to look for a large number that can’t exist.
The primary macro Insert Rows And Fill Formulas is installed on a toolbar button.
Both macros are installed on a module sheet in my The code below has extra blank lines to help identify long lines it they get wrapped when you copy them.
Normally the dates in Column B are entered using the shortcut key for the current date [Ctrl semi-colon]. It would be best to keep the macro as is for general use, but when calling from a macro to have the calling macro include the number of rows to be inserted and no Msg Box. The last row is determined by having content in Column A. Worksheet event macros are designed for a specific worksheet and only apply to the worksheet they are installed into. Examples change event, double-click, cell change, right-click. Extend Formats and Formulas can be fussy, this will trigger on the above conditions copying all formatting, and removing constants after copying the row above. Cut Copy Mode = False On Error Resume Next '-- customize range for what cells constants can be removed -- Intersect(Selection, Range("b: IV")). Clear Contents On Error Go To 0 End Sub that will copy formulas from the preceding row when the cell in Column A is selected and there is no content below in column A and no previous content on the row.
I then found and included a macro close to what I wanted and described again exactly what I really needed.