difficult problem

pjohnson

New Member
Joined
Aug 11, 2011
Messages
3
I'm trying to delete rows in a table (the table is located in the middle of a worksheet and does not begin in cell A1). This is a dynamic table where each row in the table needs to be able to change. In other words, the named range Menuitem1 is on another worksheet in the workbook. But in this table, the first row is =if(menuitem1="","",menuitem1), the second is =if(menuitem2="","",menuitem2), etc. I need the macro to delete the rows if the respective named range (menuitem1, menuitem2, etc.) is empty.

The tricky part is that I need the rows to return to normal if, at a later date, the named ranges get filled. For example, right now, there are menu items 1-4. But the table has 10 rows, in case eventually there are 10 menu items.

I need the macro to delete rows 5-10, but be able to show rows 5-7 if at a later date, the chef decides to create menu items 5-7. And if those named ranges (menu items 5-7) eventually get deleted again, to delete those rows in the table.

Please help me!!! I am an intern and don't understand how to do this!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

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