ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   reset cells (https://www.excelbanter.com/excel-discussion-misc-queries/61150-reset-cells.html)

1vagrowr

reset cells
 
Is there a way to make a "reset" button to clear only select cells?

Dave

reset cells
 
Hi 1vagrowr

Assuming you are selecting cells manually, why don't you just use the delete
button?

Dave.


"1vagrowr" wrote in message
...
Is there a way to make a "reset" button to clear only select cells?




Max

reset cells
 
There were 2 responses (from me and Bob Phillips) to your earlier 2
identical questions in this newsgroup some 3 days ago, which have not
received any feedback from you in the threads.:

a, http://tinyurl.com/bmrs5
(Bob Phillips)

b. http://tinyurl.com/bqg7y
(Max)
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"1vagrowr" wrote in message
...
Is there a way to make a "reset" button to clear only select cells?




Norman Jones

reset cells
 
Hi Ivagrwr,

In addition to the responses indicated by Max, if the cells to be cleared
are constant, try assigning the following macro to your button:

'=============
Sub ClearCells()
Dim Rng As Range

Set Rng = Range("A1:A20") '<<==== CHANGE

Rng.Clear

End Sub
'<<=============

If your intention is to delete the contents but retain formats, change:

Rng.Clear

to:

Rng.ClearContents

If you are not familiar with macros, you may wish to visit David McRitchie's
'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


---
Regards,
Norman



"1vagrowr" wrote in message
...
Is there a way to make a "reset" button to clear only select cells?




David

reset cells
 
Norman Jones wrote

Sub ClearCells()
Dim Rng As Range

Set Rng = Range("A1:A20") '<<==== CHANGE

Rng.Clear

End Sub


Jumping in late here so don't know the OP's intent, but it seems fair to
point out that .Clear as opposed to .ClearContents clears everything,
including borders, Conditional Formatting, etc.

--
David

Norman Jones

reset cells
 
Hi David,

Jumping in late here so don't know the OP's intent, but it seems fair to
point out that .Clear as opposed to .ClearContents clears everything,
including borders, Conditional Formatting, etc.


Hence my comment to the OP:

If your intention is to delete the contents but retain formats, change:

Rng.Clear

to:

Rng.ClearContents


It is certainly fair to comment, but it is undoubtedly misleading to excise
the section of my response most directly pertinent to your comment.


---
Regards,
Norman



"David" wrote in message
...
Norman Jones wrote

Sub ClearCells()
Dim Rng As Range

Set Rng = Range("A1:A20") '<<==== CHANGE

Rng.Clear

End Sub


Jumping in late here so don't know the OP's intent, but it seems fair to
point out that .Clear as opposed to .ClearContents clears everything,
including borders, Conditional Formatting, etc.

--
David




David

reset cells
 
Norman Jones wrote

It is certainly fair to comment, but it is undoubtedly misleading to
excise the section of my response most directly pertinent to your
comment.


Apologies. Totally missed that section. It was 5:00am and my eyes weren't
working yet.

--
David

1vagrowr

reset cells
 
Sorry, guys. The post wasn't displaying where I posted it (Excel general
?s). I happened across it just now when I displayed all threads.

"Max" wrote:

There were 2 responses (from me and Bob Phillips) to your earlier 2
identical questions in this newsgroup some 3 days ago, which have not
received any feedback from you in the threads.:

a, http://tinyurl.com/bmrs5
(Bob Phillips)

b. http://tinyurl.com/bqg7y
(Max)
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"1vagrowr" wrote in message
...
Is there a way to make a "reset" button to clear only select cells?





Max

reset cells
 
Don't know what happened, but trust that you've got what you wanted since,
from the many responses provided ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"1vagrowr" wrote in message
...
Sorry, guys. The post wasn't displaying where I posted it
(Excel general ?s). I happened across it just now
when I displayed all threads.





All times are GMT +1. The time now is 09:10 AM.

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