ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to hide rows with empty cells (https://www.excelbanter.com/excel-worksheet-functions/6356-macro-hide-rows-empty-cells.html)

tp58tp

Macro to hide rows with empty cells
 
I have a spreadsheet to reflect daily production. In columns A and B there
is a complete listing of all product codes and descriptions. Column C is the
particular day's production. When I normally prepare this for distribution I
manually hide the rows of products which had no production for that day - to
make a short, concise report. How can I create a macro to auomatically do
this?

Debra Dalgleish

Instead of a macro, you could use an AutoFilter (DataFilterAutoFilter)
In the dropdown in the heading for Column C, select (NonBlanks)
Or, if the rows contain zeros, choose Custom, and set the criteria to
not equal to 0

There's information on AutoFilter in Excel's Help, and he

http://contextures.com/xladvfilter01.html

tp58tp wrote:
I have a spreadsheet to reflect daily production. In columns A and B there
is a complete listing of all product codes and descriptions. Column C is the
particular day's production. When I normally prepare this for distribution I
manually hide the rows of products which had no production for that day - to
make a short, concise report. How can I create a macro to auomatically do
this?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Bob Phillips

Turn the macro recorder on, select column C, DataFilter, select the
dropdown at the head of the column, and choose NonBlanks, stop the macro
recorder.

That's it, you have your macro.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"tp58tp" wrote in message
...
I have a spreadsheet to reflect daily production. In columns A and B

there
is a complete listing of all product codes and descriptions. Column C is

the
particular day's production. When I normally prepare this for

distribution I
manually hide the rows of products which had no production for that day -

to
make a short, concise report. How can I create a macro to auomatically do
this?





All times are GMT +1. The time now is 08:12 PM.

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