ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert line via 'IF' stmt (https://www.excelbanter.com/excel-programming/356050-insert-line-via-if-stmt.html)

A[_2_]

Insert line via 'IF' stmt
 
any way to say 'insert a line' if a parameter meets a certain condition?

In my case, I want to insert a line it the invoice number doesn't match the
invoice number above it.

Thx,

A

KC

Insert line via 'IF' stmt
 
If your invoice number is in C9, then you are comparing it with that in C8

i=9
if range("C" & i)<range("C" & i-1) then rows(i).insert

"A" wrote:

any way to say 'insert a line' if a parameter meets a certain condition?

In my case, I want to insert a line it the invoice number doesn't match the
invoice number above it.

Thx,

A



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com