Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros in Excel
How can I write a macro that will delte a row in an IF funtion if the logic
is false? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros in Excel
Hi Brfiel,
Try something like: If Not Range("A1").Value Range("A2").Value Then Range("A1").EntireRow.Delete End If --- Regards, Norman "l" wrote in message ... How can I write a macro that will delte a row in an IF funtion if the logic is false? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros in Excel
Strictly you can't delete a row with a worksheet function such as if, but,
given more detail on what you are actually trying to accomplish, with examples or scenarios, I am sure we can come up with a solution for your need -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "brfiel" wrote in message ... How can I write a macro that will delte a row in an IF funtion if the logic is false? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros in Excel
I want to delete a row if my If function is false and therefore would perform
no calculations. If no calculations then the row is blank and I want to delete it. What I wondered is if I could put a macro in the third argument of the If function that would delet the row. Does that make sense? Thanks for your interest. "Nick Hodge" wrote: Strictly you can't delete a row with a worksheet function such as if, but, given more detail on what you are actually trying to accomplish, with examples or scenarios, I am sure we can come up with a solution for your need -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "brfiel" wrote in message ... How can I write a macro that will delte a row in an IF funtion if the logic is false? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros in Excel
Sort would work just fine. Can't believe I didn't think of that.
Thanks a bunch. Bob "Nick Hodge" wrote: Sorry it took a while to get back. You cannot fire any kind of macro from a worksheet function. From your description it appears you are only trying to delete rows when a cell in the column is blank. I may not be understanding you, but you could sort on this column, the blanks would go to the bottom and you could delete them there. This too could be automated -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "brfiel" wrote in message ... I want to delete a row if my If function is false and therefore would perform no calculations. If no calculations then the row is blank and I want to delete it. What I wondered is if I could put a macro in the third argument of the If function that would delet the row. Does that make sense? Thanks for your interest. "Nick Hodge" wrote: Strictly you can't delete a row with a worksheet function such as if, but, given more detail on what you are actually trying to accomplish, with examples or scenarios, I am sure we can come up with a solution for your need -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "brfiel" wrote in message ... How can I write a macro that will delte a row in an IF funtion if the logic is false? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 macros - how to merge 5 macros together into one | Excel Discussion (Misc queries) | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions | |||
Making excel macros run Word macros | Excel Programming | |||
Macro Size Limit / open macros with macros? | Excel Programming | |||
Suppress the Disable Macros / Enable Macros Dialog | Excel Programming |