LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default I don't want to repeat the same number

how can I change a repeating number?
this is what I have so far.
Thank you!

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
A = Cells(1, 1) + 2
Dim Rw, Col
Rw = Target.Row: Col = Target.Column
If Col < 2 Then Exit Sub
If Rw < 3 Or Rw A Then Exit Sub
If Cells(Rw, Col) = Cells(Rw, Col) Then
Cells(Rw, Col) = Int((A * Rnd) + 1)
Else: Exit Sub
End If
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
repeat number multiple times Brenda from Michigan Excel Discussion (Misc queries) 4 May 7th 09 01:17 PM
Random cell/number and dont repeat selected cell/number Hector PR Excel Discussion (Misc queries) 0 October 16th 06 05:02 PM
repeat a formula same column same number of rows apart steveo Excel Discussion (Misc queries) 1 July 9th 06 09:54 AM
Repeat statements "x" number of times... Frantic Excel-er Excel Discussion (Misc queries) 14 July 1st 05 04:19 PM
how do I get a calculation to repeat various number of times? weelittlekim Excel Worksheet Functions 1 October 27th 04 08:13 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"