Better way?

G

Guest

Hi, and Seasons Greetings to all!
I have a spreadsheet with formulas down 800 rows on one of the sheets. A
user can select a manufacturer from a validation list, and the data the
formulas refer to then refreshes from an OLAP cube. I then need to export
the data to a .csv file for input to Mainframe. I have code that will select
the current range, but the empty rows with formulas in them are also
selected. I could include code that would count 800 rows and delete the
empty rows containing the formulas, but I want the user to be able to select
another manufacturer after exporting the first, at which time I'll append the
..csv file to include the second manufacturer. I wondered if there was a
better way to get rid of those empty rows than having to keep looping through
code to do it. Copy & Paste Special to another sheet also includes the
formulas, so that doesn't do me any good either. Any help would be greatly
appreciated; always looking for a better way to do things. TIA
 
B

Bernie Deitrick

Cottage,

Record a macro where you filter to show only the values that you want
deleted, then select the etire column, and then select visible cells only
and delete entire rows.

Then modify the code to not select the header row, and you're pretty good.
If you need help modifying the code, post back.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top