End With
wksSheet.Activate
Application.CutCopyMode = False
Application.ScreenUpdating = 1
End Sub
-Original Message-
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Rohan
Sent: Dec/Fri/2011 11:51
To: MS EXCEL AND VBA MACROS
Subject: Re: $$Excel-
Try this.use this macro
Sub Test()
Dim RowCount As Integer
Dim S As Integer
Dim T As Integer
LR = Cells(Rows.Count, "A").End(xlUp).Row
RowCount = LR
S = Round(RowCount * 70 / 100, 0)
T = Application.WorksheetFunction.RoundUp(RowCount * 30 / 100, 0)
Range("A1").
Hi Vikas,
You will have to insert an extra column and put the formula
=RANDBETWEEN(min_value, max_value) there. Once the formula gives you
result copy the column where you had your Randbetween function copy it
and select paste special > values on the same column. This will make
the results of dumm
Hello Vikash,
Assume the values are in A2:J2. In A3, copy across.
=INDEX($A$2:$J$2,RANDBETWEEN(1,COUNTA($A$2:$J$2)))
This may give you duplicate values. if you only want the unique values. use
these.
A3,
=INDEX($A$2:$J$2,RANDBETWEEN(1,COUNTA($A$2:$J$2)))
B3, *Array Formula must hit CTRL+SHIF
Thanks @group,Yes data are in columns.But putting formula =Rand() will
give the number between 1 and 100 and it will change always. But my
intention is to select only values from my original data set randomly.
Thanks & Regards,
Vikash Chandra
Bangalore
9902622922
On Sat, Dec 24, 2011 at 6:45 PM,
Your post is a bit vague to me, regarding the data and how it is laid out.
You use the word row, but generally data is in columns. Here is a thought
that might point you in the right direction.
I am going to assume you misspoke and your data is in a column, say column
A. In column 'B' I woul
Thanks @ Anand, but the problem here will be it will give some random
number,which will be not from my original observation.I want the new
data set only from my original observation. For example, suppose my
original data set has (34,45,56,67,78,89,100,54,65,76) these values.
Now i want to split thi
Hi Vikas,
One way to do this would be using a function =RANDBETWEEN( min_value,
max_value). For example if you insert a column in which you put this
function =RANDBETWEEN(1, 100) it will generate random numbers between
1 and 100 then you can apply a filter on that column and select values
below 80