+ Reply to Thread
Results 1 to 3 of 3

select cell at random and delete contents

  1. #1
    JJ
    Guest

    select cell at random and delete contents

    If someone could me with this I'd very grateful.

    Select one cell at random in the range A2:J10 and delete the value.

    Borders to be left intact.



  2. #2
    Rowan
    Guest

    RE: select cell at random and delete contents

    Try:

    Sub delsome()
    Dim n As Integer
    n = Int(9 * Rnd + 1)
    Range("J2:J10").Cells(n).ClearContents
    End Sub

    Hope this helps
    Rowan

    "JJ" wrote:

    > If someone could me with this I'd very grateful.
    >
    > Select one cell at random in the range A2:J10 and delete the value.
    >
    > Borders to be left intact.
    >
    >
    >


  3. #3
    JJ
    Guest

    Re: select cell at random and delete contents

    Sub PickRndCell()
    Dim Table As Range
    Dim cell As Integer, i As Integer
    Set Table = Range("B6:E11")
    i = Table.Cells.Count
    cell = Int(Rnd() * i)
    Table.Cells(cell).Select
    End Sub


    "JJ" <jj@jj.com> wrote in message
    news:nexRe.18652$FA3.17785@news-server.bigpond.net.au...
    > If someone could me with this I'd very grateful.
    >
    > Select one cell at random in the range A2:J10 and delete the value.
    >
    > Borders to be left intact.
    >
    >




+ 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