IF...THEN...insert row

KJ

New Member
Joined
Apr 3, 2002
Messages
9
Hi All

Is there a way of inserting a row if the value in the cell below is > the value in the cell?
ie if in A1 we have 5 and in A2 we have 7 I would need to insert a row below A1.

I would prefer not to do this using VB.

Many thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi All

Is there a way of inserting a row if the value in the cell below is > the value in the cell?
ie if in A1 we have 5 and in A2 we have 7 I would need to insert a row below A1.

I would prefer not to do this using VB.

In a word, NO! A formula can't affect the Excel environment other than the cell it's in. This can only be done using VBA in the worksheet code module. If you want some sample code then please repost.

regards,
Dan
 
Upvote 0
Hi KJ

If you would prefer a manual approach then try this.

In cell B1 put:

=IF(A1>A2,1,"")

Copy this down as far as needed. Now select all of Column B, push F5, Click "Special", check "Formulas" and uncheck all except "numbers" and Click Ok. Now go to Insert>Rows
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top