insert row keeping formula in excel


insert row keeping formula in excel



I have a range of rows with a column with a formula I populated using ctrl-D. How can I insert a new line so values are blank but formulas are copied?

Thank you




Right click on sheet-tabs disabled in Excel

1:



Assign textbox values to corresponding cells based on name
It sounds like you are looking for a "pastespecial--> formulas but not values" option.


Gridlines in excel through interop
I'm pretty sure that isn't possible unless you use VBA..
Highlight and unhighlight specific ranges when a box is clicked
You could try something like:.
Excel import returns blank cells
This will clear any cells that don't have formulas.


Using CreateObject(“Excel.Application”) - issues with unsigned control
It assumes you are in the left-most cell in the row when you call it, and that the row doesn't have any blank cells.


Using .Find to look in another worksheet
If those assumptions aren't accurate, you'll need to tweak it to get it to work..
Using Range Values with Find
  Sub KeepFormulasInRow()     Do Until ActiveCell.Value = ""         If Left(ActiveCell.Formula, 1) <> "=" Then             ActiveCell.Clear         End If          ActiveCell.Offset(, 1).Select     Loop  End Sub 
Update. Add the code to your workbook:.
  1. Alt-F11 to open the VB Editor
  2. Insert --> Module
  3. Paste the code
Associate it with a button:.
  1. Add a button to a worksheet
  2. Associate the macro to the button
  3. If you have an activeX button, call your macro from the on_click event
Associate it with a shortcut:.
  1. Alt-F8 to open the list of macros in your workbook
  2. Highlight the macro you want to associate with a short-cut
  3. Click the options button
  4. Create your shortcut



85 out of 100 based on 65 user ratings 265 reviews

@