• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Whenever i insert Row on Top, Second Row should have Fix Formula.

sajjjid

Member
Need formula at C10 & E10, to come automatically whenever I insert a ROW on Top.
Every month i will insert a row. from January to December. Thanks.
 

Attachments

  • srn4.jpg
    srn4.jpg
    133.5 KB · Views: 33
If it only happens once a month, simply copy the formulas below up
 
If it only happens once a month, simply copy the formulas below up
Yes, ur right, i am doing same thing. but still i thought there should be formula or macro for this. e.g. if b9=January-december then c10=sum(2+2.)
Thanks.
 
Does something like this helps you further?
See attached
 

Attachments

  • Insert row.xlsb
    15.5 KB · Views: 10
Hi, glad that helped.
How to explain ? I am working with a Dutch excel version. explaining is not that easy.
1. this is the code
Code:
Sub belleke()
ActiveCell.EntireRow.Insert
Range("A" & ActiveCell.Row).FormulaR1C1 = "=EDATE(R[1]C,1)"
Range("A" & ActiveCell.Row).NumberFormat = "mmmm"
Range("C" & ActiveCell.Row).Offset(1).FormulaR1C1 = "=(R[-1]C[-1]-RC[-1])*1.5"
Range("E" & ActiveCell.Row).Offset(1).FormulaR1C1 = "=(R[-1]C[-1]-RC[-1])*1.5"
End Sub
You can put that under any shape you create or under a button from the developers ribbon tab.
or an active X controlbutton from the developers ribbon tab. (what you prefer.)
2. See also the formulas from A12 up until april, copy these when you want to start with may from then it goes automaticly if you use the code.
Hope it is clear.
 
Hi, glad that helped.
How to explain ? I am working with a Dutch excel version. explaining is not that easy.
1. this is the code
Code:
Sub belleke()
ActiveCell.EntireRow.Insert
Range("A" & ActiveCell.Row).FormulaR1C1 = "=EDATE(R[1]C,1)"
Range("A" & ActiveCell.Row).NumberFormat = "mmmm"
Range("C" & ActiveCell.Row).Offset(1).FormulaR1C1 = "=(R[-1]C[-1]-RC[-1])*1.5"
Range("E" & ActiveCell.Row).Offset(1).FormulaR1C1 = "=(R[-1]C[-1]-RC[-1])*1.5"
End Sub
You can put that under any shape you create or under a button from the developers ribbon tab.
or an active X controlbutton from the developers ribbon tab. (what you prefer.)
2. See also the formulas from A12 up until april, copy these when you want to start with may from then it goes automaticly if you use the code.
Hope it is clear.
No, I did not succeed in copying that code.
 
sajjjid
Test this version...
1st You have to select 'Month'-cell
2nd press [Insert Row]

note: Would months would be filled with dates?
 

Attachments

  • Insert row.xlsb
    16.8 KB · Views: 4
Back
Top