Selecting Random Lines From Data?

Nov 28, 2012

I have a set of data spanning across 400 rows and I want to somehow be able to have a macro to randomnly select say 40 rows of data and highlight it..

View 5 Replies


ADVERTISEMENT

VBA Selecting Random Cells

Mar 21, 2013

I found the code below which randomly selects number and places them into column "I". However, I need the code to search through column "F" and randomly select numbers from column "F" and place the result in column "I".

' Select the indicated number of items from the
' currently selected cells.
Public Sub SelectRandom(ByVal num_to_select As Integer)
Dim num_items As Integer
Dim indexes() As Integer

[Code] ........

View 3 Replies View Related

Selecting Random Cell With Color

Feb 18, 2013

The macro below will select a random cell, I would like to add a color (green) to the selected cell and add NO/CANCEL to msgbox, when NO is selected it will continue selecting random cell and CANCEL exit sub.

[Code] .....

View 5 Replies View Related

Deleting Row By Random Selecting A Cell

Feb 26, 2009

I wish to randomly select a cell, using an InputBox, and then delete the entire row that cell is in. Once the row has been deleted the InputBox opens again for the next random cell to be selected.
When finished selecting I wish to cancel out.

View 9 Replies View Related

Selecting Multiple Discontinuous Columns With Two Lines Titles

Jan 24, 2014

I have quite a long sequence of column for which the headers are all two-lines titles (with a line break). I need to copy many columns that are discontinuous, and the operation would save me a lot of time if I could select them at once. Of course, I know about selecting the columns holding CTRL, but here is the snag: as soon as a two-line title column is selected, the formula bar displays the content of the header, obviously on two lines, and I can't select any more columns. I tried many things, but nothing could solve this...

Is there anything I can do besides copying the columns one by one (which would take a long time) or renaming them?

View 1 Replies View Related

Selecting All Data In Specific Columns Without Selecting Adjacent Column

Mar 10, 2014

Using VBA, I need to Select A1:C14.

The problem is that A1:C14 contains blank cells, and there is also an adjacent column D that I do not want to copy.

So, UsedRegion and CurrentRegion aren't doing it for me. (It selects Column D too.)

Obviously, this is an example...the real data set is an export and varies in size.

View 1 Replies View Related

Generate Random Numbers In Random Cells

Sep 18, 2009

I am working on a Random Cycle Count Generator that provides random SKU#s based on 3 separate columns of SKU listings. The user clicks a button to generate the SKU#s to cycle count for that day. What I would like to see is a date stamp in the columns next(B,D,F) to the referenced SKU listing(A,C,E) based on which SKU#s are generated. This will let me see the last date that the SKU was generated. I would also like it to automatically save after generating.

View 2 Replies View Related

Putting Lines Of Data Into A Table

Dec 23, 2013

I am having trouble being able to put data into a table. The data I have breaks down orders of products in crates into lots of 45 crates with a remainder.

I would like to be able to fill a table from left to right which displays the item number with the corresponding amount of crates, which seamlessly goes from one item to the next.

I have attached an example.

pallet data.xlsx‎

View 5 Replies View Related

Compare Lines Of Data And Return A Given Name?

Dec 5, 2008

What formula do I need for the cells in column F to show the name of the cheapest supplier ... for example the cheapest (£17,820) in line 2 is supplier A ????

View 5 Replies View Related

Sorting Multiple Lines Of Data

Nov 20, 2007

I have a large spreadsheet I need to sort into alphabetical manager order.

As there are between 2 and 20 rows per manager I would like to know if I am able to sort this into alphabetical order!

View 9 Replies View Related

Random Data Selection

Jan 13, 2009

I have data for number of firms as :

year firm
1 1
2 1
3 1
1 2
2 2
3 2
1 3
2 3
3 3
.............
.............
1 1000
2 1000
3 1000

how can one chose random samlpe from this population.

View 3 Replies View Related

Grid Lines Disappear When Importing Data

Jan 16, 2007

I sometimes import data in the copy-paste way from completely different sources, eg. a program on the web or whatever, which has arranged the data in a table.

It is often succesful with the data neatly arranged in the spreadsheet in columns and rows and all, but sometimes the gridlines disappear even though 'cell format' is set to 'none' in 'grid lines' and the settings have a mark for 'visible grid lines' and their color is 'automatic'. Only the imported area misses the gridlines.

It is of course possible to set some grey gridlines manually in cell format, but then I get them on the print also and I don't want that.

View 9 Replies View Related

Importing Data Into Word - But Eliminating Zero Value Lines

Mar 19, 2013

I've been asked to streamline some processes for a company I used to work with before I went on maternity leave (been two years now, my brain feels like its gone to mush). One of the things they have is a document where they input EVERYTHING manually into a word, sometimes the same thing several times. (felt like I had gone back into the dark ages). I know I can set up a template in Excel where all the required information can be imported into specific places within the word document, but Im struggling to find a solution to one part.

They get their clients to fill out an expenses form showing all their monthly expenses, some fields will be filled in but others are not relevant to them so they are left as zero.

How do I go about just importing ONLY the fields that have values input against them?

For example;

Mortgage $2000
Rent $0
Electricity $300
School Fees $0
Contents Insurance $200
Water $80
Pet Care $50
Groceries $1000
Takeaways $0

Then when the data is imported into word it would show up like this (formatted better of course)

Mortgage $2000
Electricity $300
Contents Insurance $200
Water $80
Pet Care $50
Groceries $1000

View 1 Replies View Related

Insert Macro For Multiple Lines Of Data

Feb 28, 2012

I am trying to write a formula to insert in a macro for multiple lines of data.

Column B contains the date that I am comparing the date in Column C against. I want to be able to highlight the content on that row if the date in column C is greater than or equal to column B. how to write this?

Sample data:

3/12/20123/12/2012
3/12/20123/1/2012
3/6/20123/6/2012
2/29/20123/2/2012

I would need row 1 and 4 to highlight in red. this is part of a long Macro that is written and includes many other steps, but I cannot seem to make this step work correctly.

View 2 Replies View Related

Carrying Out LINES To Selections Of Data In 2 Columns

Jul 29, 2013

Power (kW)
Head (m)
Mass Flow (kg/s)

51.58
30.00
206.1922

92.2492
30.00
401.8627

[code].....

The data I have looks like above, with the Head increasing by 0.1m after a changing number of rows. What I would like to do is to select the Power and Mass flow rate where the head is constant, I.e all of the power to the left of 30.00 and all of the mass flow for 30.00 and produce coefficients of a 6th order polynomial which for 30.00 looks like :Head (m)

6
5
4
3
2
1
A

[code].....

As the data goes down, there are different numbers of rows with constant head value, i.e 14 rows of 30.00m and 7 for 35m. I am trying to run a macro that will give me 150 rows of the coefficients of the 6th order fit line for each head value.

View 1 Replies View Related

Graph With Source Data On Multiple Lines

Apr 3, 2007

I have an excel worksheet that contains two sets of data. These numbers are then plotted onto a line graph to show the two sets of data against each other.

The graph is working fine, but only for a specific amount of data. The data is split into mutiple lines. From cells A1 all the way to BI1 is one row. I then have information in A4 to BI4. I would like to plot this information on a graph as a single continuous line. Is this possible?

Basically, My graph source is currently =Data!$A$2:$BI$3. This gives me two lines that I want. How do I get the data from A4:BI4 to join up to the first line in the graph.

View 5 Replies View Related

Range Of Data - VBA Random Picker

Aug 28, 2013

I have range of data where i want to randomly select a value in that range but what i want is to visually see it activating random cells and then finally select 1 at the end. Its just more of a nice visual effect and then select a value/cell.

This code just goes through all the cells but not exactly what i want to do.

Code:
Sub test()
Dim ws As Worksheet
Dim cell As Range
Set ws = Sheets("Sheet1")
For Each cell In ws.Range("Data")
cell.Activate
Next cell
End Sub

View 5 Replies View Related

Consolidation Of Workbooks To Single Workbook When Data Is More Than 66k Lines

Aug 24, 2012

I have around 21 excel files in a particular folder all the files column headings are same and but number of line differ from 0 to 50K. Overall all 21 files will have more then 2 Lakhs lines.

i require a code which consolidate the all 21 files in to single workbook. if first sheet in full then data should copy to next sheet, so on. I also require file name in the first column of destination file when files are being copied.

View 1 Replies View Related

Graph Lines Disappear When Group Or Hide Data

Mar 11, 2014

I have a file sheet named "ratio summary." The data to this is linked to a number of different working sheets (not in the attachment for obvious reasons)

Currently the data in the ratio summary is grouped by year but "open" and the Graph worksheet is automatically linked to the data in row11.

However when I group the data by year (i.e. clicking the "-" figure) the graph also changes.

I haven't deleted the data so don't understand why the graph data is changing.

excel graph help.xls

View 3 Replies View Related

Move Lots Of Data From A Cell To Multiple Lines

Mar 16, 2009

I have a problem that i don't know how to solve. I have one cell with values like this: 127;71;512;458;1250;722;2154;742;29;350;

and what to put in lines like this:

127
71
512
458

Has i have a lot of data in the cell and everyday it changes, i take several hours doing it manually. I have tried using the command data/ text in colluns but because i have huge data it leaves a lot out. Do you have any idea how to put that values in lines automatically?

View 4 Replies View Related

Sumproduct #Num!,#N/A (select Specific The Sum Of Various Lines Of Data That Fit Within 3 Parameters)

Mar 31, 2009

I am having a problem with a sumproduct strand. I've written 4 different ways to no avail. What I'm trying to accomplish is to select specific the sum of various lines of data that fit within 3 parameters

1.) =SUMPRODUCT((Sheet1!$H:$H="XYZ"),(Sheet1!$G2:$G136="Withdrawal"),(Sheet1!$I2:$I136="113183"),Sheet1! $K2:$K136)
Response: #NUM!

2.)=+SUMPRODUCT(--(Sheet1!$H2:$H136='Sheet2'!$A$5),--(Sheet1!$G2:$G136="Withdrawal"),--(Sheet1!$I2:$I136='Sheet2'!$B$5),Sheet1!$K:$K)
Response: #Num!.................

View 2 Replies View Related

Macro To Insert Lines And Then Copy And Paste Data?

Aug 23, 2012

I'm looking for a way to write a macro to insert 5 lines at the end of the data in column A. Then I want to copy a range into the newly inserted lines. I would press a button anytime I need this to occur.

Current last line of data A39

Need to insert 5 rows after A39

Then copy range BA30:CB34 into the newly inserted rows.

View 4 Replies View Related

Excel 2007 :: How To Delete 655000 Lines Of Data

Sep 21, 2012

I have a public/shared Excel 2007 workbook on our network and someone colored an entire column yellow. When that happened, it increased the number of rows to over 655,000. I didn't know that was posible but they are there... The thing moves very slowly now and when I try to delete (45,000 lines at a time), I either get a error window telling me I don't have resources to perform the operation, or I do smaller chucks and after 30 minutes deleting lines, it will not save.

I would rather not have to recreate the whole workbook if I can delete the lines on this one page.

View 9 Replies View Related

Random Sample Out Rows Of Data From A Sheet

Oct 4, 2009

I've coded a macro that can randomly sample out rows of data from a sheet. This macro is used to sample out certain rows from a master sheet full of data (which has 48 columns) based on user names (a column titled LAST_UPDATE_NAME). For Example (ref. wkb attached), if for 5 users named Alastor, Catherine, Emma, Julie and Victor for whom i've to choose data from the Dump sheet.

I need to design a module in which if i input the no. of samples to be chosen against each name, then that many number of rows has to be chosen for that particular name and copied to a new sheet (probably such sheets can be renamed with the usernames). Also i want to consolidate the copied data from the multiple sheets and consolidate them to one sheet.

View 4 Replies View Related

Getting Formula To Find Data In Random Table

Jan 25, 2012

I was trying to figure how to write a formula that would return the contents of a cell in a table.

Here is the situation....

I have a 10 row by 10 column "grid". the top and left side of the grid contains a random number from 0 to 9. The numbers do not repeat.

It would remind you of a block pool.

If I have two numbers, 0 to 9 , is there a way to return the cell that corresponds to the intersection of those numbers in my table?

It would be both a Vlookup and an Hlookup which I can't do.

View 4 Replies View Related

Pulling Specific Data From Random String

Jan 15, 2010

I have random comments in a column of cells of which I'm searching for a specific string of characters that may be contained in each cell. I want to pull 2 pieces of data from this specific string and place the data in 2 other cells in the same row.

Sample comments in cell 'N1':

..... blah, Appt: Friday; 12/4; night drop off. blah, blah....
Sample comments in cell 'N2' (and so on and so on):

.....blah, blah, Appt: Thurs; 12/3; 12:30PM. blah, ....

The specific string in the above examples will always begin with:

APPT:
Then the key elements found directly after the 'APPT:' are:

Thurs; 12/3; 12:30PM.

(which are the)

DAY; DATE; TIME.
These elements will be always separated by the semi-colon ';' and the string will always end with the period '.'

I need a pair of formulas to be in col 'J' & 'K' to extract the DATE and place it in column 'J' and the TIME and place in column 'K', both in each same rows.

So, from the 2 above samples I would need the following:

in Cells:
J1 - 12/4 ....... K1 - night drop off

J2 - 12/3 ....... K2 - 12:30PM

I've been trying to come up with a formula using a combination of FIND() & MID(),

View 9 Replies View Related

Selecting Data And Using It For Further Calculation?

Jul 11, 2014

I have got historical intraday-data of a stock index and first of all need to summarize them by seconds: The data looks like that:

time price
08.00.00 159
08.00.00 153
08.00.00 148
08.00.01 157
08.00.01 152
08.00.02 167
08.00.02 151
08.00.03 155
08.00.03 154
08.00.03 154

So I want to calculate the average price per second. Is there any formula to tell Excel that it should sort it by second and further calculate the average price of it.

View 5 Replies View Related

Selecting Only Cells That Contain Data

Sep 15, 2009

when run a macro to make the macro select all the cells in a specific column that only contain data i.e. i have a spreadsheet 5 columns wide by 23 rows deep, the macro at the moment selects the 5 columns (this never changes) but the number of rows always changes 123, 56, 1, etc i need to to always select the rows that have data.

View 14 Replies View Related

Selecting Data For A Chart In VBA

Dec 1, 2011

I have made a macro which generates a bar chart for many sets of data.

I'm having a problem at the moment however, as I need to generate a line graph on the same chart. How does one generate another x-axis and graph on a chart? Let me know if you want to see my current macro.

View 3 Replies View Related

Selecting Data By Values

Mar 19, 2014

I have a worksheet with about 10,000 rows of data and from this raw data I need to create 60 or so separate spreadsheets for 60 different companies- so around 160 some row actually pertain to a given client. However, it's not fixed and from one month to the next the actual number of rows changes so I can't just use a simple range. There are two possible ways to mark that the data pertains to a new client. But it will be easier to just show a quick example:

1/1/2014
CompanyA

Total
CompanyA

1/1/2014
CompanyB

So anytime it runs into "Total" in column 1 it should know to start another iteration or when the cell in column b does not equal the cell directly above it. Below is a truncated version of what I have so far:

Sub MonthlyStatements()
'
' MonthlyStatements Macro
'
' Keyboard Shortcut: Ctrl+w
'
Dim taxi As String
Range("F32").Select
Workbooks.Add

[Code] ......

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved