![]() |
nest macro in a formula
i am comparing pairs of cells in a column of data using an if statement. if
the statement is false i would like to add a row between them. i have created a macro that just adds a row but i dont know how to nest it in an if statement nor do i know exactly how to make sure that excel knows that i want to add the new row above. i have tried to copy and past in vb but i am very new to this and hope someone can help. using excel 2003 -- BBoyd |
nest macro in a formula
You can't call/run a macro from a worksheet formula. What you will
need to do is have another macro which contains your IF THEN ELSE ENDIF statement and for this to call your first macro to insert the row. Hope this helps. Pete On May 21, 5:36*pm, BBoyd wrote: i am comparing pairs of cells in a column of data using an if statement. *if the statement is false i would like to add a row between them. *i have created a macro that just adds a row but i dont know how to nest it in an if statement nor do i know exactly how to make sure that excel knows that i want to add the new row above. *i have tried to copy and past in vb but i am very new to this and hope someone can help. *using excel 2003 -- BBoyd |
nest macro in a formula
not exactly sure what yoy mean. i will try to attach an example soon.
thank you for your time. -- BBoyd "Pete_UK" wrote: You can't call/run a macro from a worksheet formula. What you will need to do is have another macro which contains your IF THEN ELSE ENDIF statement and for this to call your first macro to insert the row. Hope this helps. Pete On May 21, 5:36 pm, BBoyd wrote: i am comparing pairs of cells in a column of data using an if statement. if the statement is false i would like to add a row between them. i have created a macro that just adds a row but i dont know how to nest it in an if statement nor do i know exactly how to make sure that excel knows that i want to add the new row above. i have tried to copy and past in vb but i am very new to this and hope someone can help. using excel 2003 -- BBoyd |
All times are GMT +1. The time now is 11:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com