ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF FUNCTION (https://www.excelbanter.com/excel-worksheet-functions/7070-if-function.html)

Chandrashekhar

IF FUNCTION
 
CAN I INSERT ROW OR COLUMN WHILE USING IF FUNTION FORMULA.

THANK YOU !!

Dave R.

This cannot be done with a formula but could be done with VBA.


"Chandrashekhar" wrote in message
...
CAN I INSERT ROW OR COLUMN WHILE USING IF FUNTION FORMULA.

THANK YOU !!




Gord Dibben

No

Worksheet Function Formulas can only return values to the cell in which they
reside.

To insert rows and/or columns you would need your "If" statement in a macro.

Sub Insert_Row()
If ActiveSheet.Range("A1").Value = "chan" Then
Range("A1").Offset(3, 0).EntireRow.Insert
End If
End Sub

Gord Dibben Excel MVP

On Wed, 24 Nov 2004 21:11:02 -0800, "Chandrashekhar"
wrote:

CAN I INSERT ROW OR COLUMN WHILE USING IF FUNTION FORMULA.

THANK YOU !!




All times are GMT +1. The time now is 10:48 PM.

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