+ Reply to Thread
Results 1 to 104 of 104

Clearing multiple cells in 1 click?

  1. #1
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253

    Question Clearing multiple cells in 1 click?

    A B
    1 Liquor $100.00
    2 Medical $50.00
    3 breakfast $2.50
    4 lunch $1.20
    5 dinner $5.30
    6 Total: =SUM(B1:B5)
    7 breakfast $13.50
    8 water $1.10
    9 Dinner $80.00
    10 others $13.90
    11 Total: =SUM(B7:B10)

    Is it possible to create a button to clear only A1:B5 and A7:B10? Something like
    if A12=1, A1:B5 and A7:B10 will be cleared?

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning Lewis Koh

    This code will do the trick.

    Sub Mod1()
    If Range("A12").Value = 1 Then
    Range("A1:B5,A7:B11").Clear
    End If
    End Sub

    Copy it into a blank module, and draw yourself a button using the Forms toolbar, when you've created your button right click it, and select assign macro, and select Mod1 (or whatever you've chosen to call it).

    HTH

    DominicB

  3. #3
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  4. #4
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253
    wow, that's a nice function Just one click to delete the selected cells. Thanks!!
    By the way, how do I use the function protect cell? I protected the cell but I still can delete its content. I was wondering if I could protect whatever cells that I do not one to delete so that I could select the whole worksheet to delete the rest.

  5. #5
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253

    Question

    [QUOTE=Max]
    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    QUOTE]

    Hi Max, is there a limitation as to how many selectations I can select? I tried to select 31 "range" and save it as ""MyRange" but once I pressed enter, only
    19 selectations are selected. The other 12 ranges had to save it as "MyRange2".

    How do I clear the "MyRange" if I wanted to use "MyRange" for other selections?

  6. #6
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  7. #7
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  8. #8
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  9. #9
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253
    Hi Max,

    Shorten the sheetname can allow me to select 31 "range" too. But I could select 20 ranges now. I assume defining 2 "Ranges" is the only way to do a quick clear of the selected cells?

    [qoute]
    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...
    [qoute]

    Actually I wanted to protect certain cells so that I could highlight the whole worksheet and delete those unprotected cells. But Once I try that, it will still prompt that the cell selected are protected. How can I make it simplier to delete specifif cells?

  10. #10
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  11. #11
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253
    Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown functions, I wished I knew them all.

  12. #12
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  13. #13
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  14. #14
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  15. #15
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  16. #16
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  17. #17
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  18. #18
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  19. #19
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  20. #20
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  21. #21
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  22. #22
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  23. #23
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  24. #24
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  25. #25
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  26. #26
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  27. #27
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  28. #28
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  29. #29
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  30. #30
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  31. #31
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  32. #32
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  33. #33
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  34. #34
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  35. #35
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  36. #36
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  37. #37
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  38. #38
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  39. #39
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  40. #40
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  41. #41
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  42. #42
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  43. #43
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  44. #44
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  45. #45
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  46. #46
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  47. #47
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  48. #48
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  49. #49
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  50. #50
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  51. #51
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  52. #52
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  53. #53
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  54. #54
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  55. #55
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  56. #56
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  57. #57
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  58. #58
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  59. #59
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  60. #60
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  61. #61
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  62. #62
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  63. #63
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  64. #64
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  65. #65
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  66. #66
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  67. #67
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  68. #68
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  69. #69
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  70. #70
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  71. #71
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  72. #72
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  73. #73
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  74. #74
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  75. #75
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  76. #76
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  77. #77
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  78. #78
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  79. #79
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  80. #80
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  81. #81
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  82. #82
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  83. #83
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  84. #84
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  85. #85
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  86. #86
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  87. #87
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  88. #88
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  89. #89
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  90. #90
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  91. #91
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  92. #92
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  93. #93
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  94. #94
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  95. #95
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  96. #96
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  97. #97
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  98. #98
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




  99. #99
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Think you'd need a sub to do that. Formulas cannot clear cells.

    But here's something simple to play with
    (does the job with just 2 "clicks")

    Select A1:B5, hold down CTRL then select A7:B10
    Click inside the namebox*, type a name, say: MyRange
    Press ENTER
    *the box with the the droparrow just to the left of the "=" sign

    Now whenever you want to clear A1:B5 and A7:B10,
    just select "MyRange" from the namebox droplist and press Delete
    (Just an extra "click" ! <g>)
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > A B
    > 1 Liquor $100.00
    > 2 Medical $50.00
    > 3 breakfast $2.50
    > 4 lunch $1.20
    > 5 dinner $5.30
    > 6 *Total:* =SUM(B1:B5)
    > 7 breakfast $13.50
    > 8 water $1.10
    > 9 Dinner $80.00
    > 10 others $13.90
    > 11 *Total:* =SUM(B7:B10)
    >
    > Is it possible to create a button to clear only A1:B5 and A7:B10?
    > Something like
    > if A12=1, A1:B5 and A7:B10 will be cleared?
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  100. #100
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    > ... I protected the cell but I still can delete its content

    You need to apply the protection via:
    Tools > Protection > Protect Sheet > Passwrd? > OK

    > .. I was wondering if I could protect whatever cells
    > that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.


    Think it won't work in this way. But we could try it the other way round
    where we select and unlock only the input cell range(s), then apply the
    sheet protection as above.

    Assuming MyRange covers the 2 input tanges

    Select the entire sheet > Format > Cells > Protection tab
    Ensure "Locked" is checked > OK
    (This step is usually not necessary as by default all cells are checked as:
    Locked.)

    Select MyRange > Format > Cells > Protection tab
    Uncheck "Locked" > OK

    Now click Tools > Protect > Protect Sheet ...

    The entire sheet will be protected except MyRange
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote
    in message news:[email protected]...
    >
    > wow, that's a nice function Just one click to delete the selected
    > cells. Thanks!!
    > By the way, how do I use the function protect cell? I protected the
    > cell but I still can delete its content. I was wondering if I could
    > protect whatever cells that I do not one to delete so that I could
    > select the whole worksheet to delete the rest.
    >
    >
    > --
    > Lewis Koh
    > ------------------------------------------------------------------------
    > Lewis Koh's Profile:

    http://www.excelforum.com/member.php...o&userid=25712
    > View this thread: http://www.excelforum.com/showthread...hreadid=391513
    >




  101. #101
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote:
    > > .. Is there a limitation as to how many selectations I can select?
    > > I tried to select 31 "range" and save it as ""MyRange" but once I
    > > pressed enter, only 19 selectations are selected.
    >> The other 12 ranges had to save it as "MyRange2".


    Think named/defined ranges are actually formulas, and are hence subject to
    the max formula length limit (1024 chars?). Believe this limit is what hit
    you. If we were to shorten the sheetname to a single digit or alpha (e.g.:
    use: "1" or "A" instead of the longish:"Sheet1", "SheetA", then I think we
    could pack in a bit more before we hit the limit <g>

    > > How do I clear the "MyRange" if I wanted to use "MyRange" for other
    > > selections?


    Click Insert > Name > Define
    (That's where the options to delete, add, amend named/defined ranges lie)

    Select MyRange (which should appear under the "Names in workbook") box,
    then amend the range(s) appearing under the "Refers to:" box
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  102. #102
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    Minor typo correction:
    > Select MyRange (which should appear under the "Names ....


    should read as:
    > Select MyRange (which should then appear under the "Names ...


    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  103. #103
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    "Lewis Koh" wrote

    > Shorten the sheetname can allow me to select 31 "range" too. But I
    > could select 20 ranges now. I assume defining 2 "Ranges" is the only
    > way to do a quick clear of the selected cells?


    I'd guess so. Hang around awhile.
    Maybe others would step in here and offer you better insights.

    > Actually I wanted to protect certain cells so that I could highlight
    > the whole worksheet and delete those unprotected cells. But Once I try
    > that, it will still prompt that the cell selected are protected.


    well, I tried that earlier and it didn't work for me, too <g>,
    hence the earlier response to the effect ..

    > How can I make it simplier to delete specific cells?


    I've given you all I've got <g>.
    Hang around awhile. Maybe others would step in here
    and offer you some other insights.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  104. #104
    Max
    Guest

    Re: Clearing multiple cells in 1 click?

    You're welcome, Lewis !

    > ... Excel can be so fun ...

    and that's one reason why this respondent hangs around .. <g>
    cheers
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Lewis Koh" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Max Hmm.....Excel can be so fun *sigh* so many unknown
    > functions, I wished I knew them all.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1