Is it possible to create a code that allows a button to hide specific cells (eg (B10:B15) + C17 + C19 + (D10:D18)) when pressed and then have the reappear when pressed again? Alternatively another button for the reapearing can be accepted.
You cannot hide a single cell. But if you want to hide/unhide eg a number of columns using a shortcut key you can do as follows:
View
toolbar, click Macros
, then Record Macro...
.Ctrl +...
). [Let's assume you put 'h'] Then press OK. View
toolbar, click Macros
, then Stop Recording
.Now when you press the defined shortcut key (eg Ctrl+h), the desired columns will hide.
You can follow the same steps to define a different shortcut key for unhiding.
If you want to make some single cells (kind of) invisible, you can do that by changing the font color to match the background color. Again you can use the same steps mentioned above to create a shortcut key for that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.