Copy Top X Results

Jan 7, 2007

attached the file. Sheet1 & Sheet2 are the "Source" sheets and "Summary" sheet is the "Target" sheet.

1) Macro "TopParts1" filters the Top 80% (Column B) in Sheet1 and copies this to A1 in the "Summary" sheet.

2) Macro "TopParts2" filters the Top 80% (Column B) in Sheet2 and copies this to E1 in the "Summary" sheet.

What I am hoping for is to combine the macros 1) & 2) so that the Table as
shown in "Summary2" sheet is done in one instance. The highlighting is just for illustration. Presently I need to select sheet1 rum the 1st macro... select sheet2 run the 2nd macro. Not very efficient. One table for 1 macro would be excellent.

View 5 Replies


ADVERTISEMENT

Copy Pairs From 2 Columns To Formula Reference Cells & Copy Updated Formula Results

Jun 24, 2008

I am currently working on a data analysis project (data mining) and need to collect and later analyze statistics for the inputs which control a series of calculations. These statistics are shown in the Statistics 1, Statistics 2 and Statistics 3 cells in the workbook that I attached. The inputs are X,Y; all possible values for these inputs are listed in the N,O columns. Basically I need a macro which would take the values from these two columns and place them pair after pair into the controlling cells (K3, L3), then it would copy cells H2 through L3 (updated stats) to a new sheet after each copy operation - so that I will finally have a list of statistics for all of the input pairs.

View 3 Replies View Related

Copy Non Zero Formula Results

Sep 4, 2007

I have 4 source workbooks and a master workbook which is linked to the source workbooks, if the source workbooks have no value in specfic cells the master workbook which is linked to it shows a 0 (not a problem). Now if I want to copy only cells which have a value other than the 0 to the end of used rows on another sheet on the Master workbook using VB I run into a problem because it sees 0 as a value and copies as well.

The issue is how do I stop the 0 showing and not being seen as a value. This 0 shows regardless of format.

View 9 Replies View Related

Copy And Paste ALL Search Results

Nov 6, 2006

I have to extract all the entries that have certain words.

The worksheet has 600 rows, setup like

Column A=unique document number (never repeats)
Column B=Document Titles (some repeats, though the documents that are the same are not titled the same, though they have certain keywords in like documents)
Column C=Document Types

I want to search Column B for all titles containing the word/text string WOR, and then copy the row of A, B, and C when WOR appears in Column B, and put it into another worksheet.

Now obviously, I can do a "Find All" for WOR on Column B, but I can't cut and paste the results into another worksheet.

I prefer a simple formula, cause my VB and Macro skills are pretty non exsistant, though I will learn if that is what it takes.

View 11 Replies View Related

Excel VBA - Copy Subtotal Results

Mar 18, 2010

I have several macros that join spreadsheets and then sort and subtotal them. I now need to use my spreadsheet that has the subtotals and place only the subtotals into a new workbook. For instance the new file should contain the name of the item and "subtotal" for that item, and the list of all the data should remain in the original file.

View 9 Replies View Related

Copy And Paste Results Instead Of Deleting

May 31, 2013

I have this macro which does a really nice random selection, the problem I have though is that it deletes everything except for the result set. How to adjust the macro in such a way that instead of deleting the the original data, it copies and pastes the result set to a new worksheet?

Code:
Sub RandomSelect()
Application.ScreenUpdating = False 'disable screen updating to avoid screen flashing
Application.DisplayAlerts = False

Dim wbk1 As Workbook, wbk2 As Workbook, lstRow As Long, wks As Worksheet, startCut As Integer, selNum As Integer, lstCol As String

Set wbk1 = ActiveWorkbook
Set wks = wbk1.ActiveSheet

[Code] ......

View 1 Replies View Related

Copy All Cells In Column E And Get The Right Results

Dec 10, 2009

I would like if someone could tell me what formula to put in the cells in Column E so that I can copy it to all cells in Column E and get the right results.

Here are the results I need: ....

View 9 Replies View Related

Copy Subtotal Results To New Sheet

Sep 3, 2007

I wonder if someone has a clever solution for the following, I have a spreadsheet where I have done subtotal on some of the figures, does anyone know how I can copy (and paste into a new sheet)only the rows where I have a subtotal?

View 8 Replies View Related

Copy Filtered Results To Another Workbook

Oct 16, 2007

I have a large data set (from columns A - I, with over 10,000 rows) of information located on Sheet1 that I need to be able to go through to find the criteria (which is text and is located in column B) I'm looking for. I know how to write the VBA code to use Excel's AutoFilter option .... what I don't know is how can I can identify and copy the results the AutoFilter pulls up, from Sheet1 into another sheet because the data is on a number of different rows.

For example, I have to search column B three separate times for the following criteria:
1. xyz
2. acb
3. hij

this is what I have for the autofilter:

Range("A1:I1").AutoFilter Field:=3, Criteria1:="=xyz"

Today, I may find the "xyz" information on rows 6-150, 755-787, 1021, and 8524-8999, whereas tomorrow "xyz" may be on rows 51-101, 8547, and 9989-9991.

View 7 Replies View Related

AutoFilter Table & Copy Results

Jan 29, 2008

The error above comes up every time I copy filtered data to a new worksheet. It does its work but the said error comes up.

Sub AUTOFILTER_withouthead()

' AUTOFILTER_for_drop Macro
' Macro recorded 1/27/2008 by DD
Dim ws As Worksheet, wd As Variant
Set ws = Worksheets((Worksheets("Destination"). Cells(1, 6).Value))
Set wd = Worksheets("Destination").Range("A1:F65000") ...

View 3 Replies View Related

Sheet Copy Results In New Workbook

Mar 19, 2008

I've got a bizarre problem here. I've been working on a piece of code and one line has started behaving erratically: Sheets("BLANK SCORE").Copy after:=Worksheets(Worksheets.Count)

I want to do is create a copy of the sheet called "BLANK SCORE" and copy it after the last sheet in the workbook. This code is part of a loop that runs a maximum of 10 times (potentially creating 10 copies) and I've had inconsistant results such as:

*) Code works and copied sheet is created (desired result)
*) Code is ignored and no copied sheet is created (shouldn't do that)
*) Sheet is copied to a new blank Workbook (...huh ?)

I've also tried changing:.........

View 2 Replies View Related

Copy / Paste For Results Of Formula In Column To Row?

Jun 13, 2014

I am attempting to copy the results of a formula in a column to a row. The data in the column is in a different worksheet. Although pasting the data using the transpose option in the drop down menu works, I really want to have the results of the formula returned. The reason for this is the results are variable based on the formula.

View 9 Replies View Related

Copy And Paste Except Null Value Formula Results

Feb 19, 2009

From time to time the data on worksheet x changes and it is picked up by worksheet y and I need to copy and paste the new information to sheet z. I've been fiddling with the code to get it to paste the values and pick up the new values, but it won't.

I need to adjust the code to copy to the last column, and the last row, and copy just the values. Ifm unable to do t his.

I've attached the sheet so you'll see that the data will only copy once.

Go to worksheet z and press the command button.

I got the code from this site: ...

View 6 Replies View Related

Search In A Datafile And Copy The Results Into Another Worksheet

Sep 24, 2009

I use the Macro below to search in a datafile and copy the results into another worksheet. Only problem, when the macro finds a result he should copy and start over again, starting from the row below, but somehow he start 2 rows lower, so I'm missing results. (when he should copy row 2,3,4,5,6 - the result is only 2,4,6) I tried changing

WerkRij = WerkRij + 1 into Werkrij = WerkRij
StartRij = Rij + 1 into StartRij = StartRij
but then he keep searching and copying the same cells

View 2 Replies View Related

Copy And Paste Autofilter Results To Different Sheet?

Jul 1, 2013

I have a sheet that I need to routinely filter for a specific code then paste it into a different sheet in the same workbook. I would love to set up a simple macro that would do this for me, but I can't seem to figure it out.

In the results I would like the header row if at all possible, but I can always just make it part of the macro.

View 2 Replies View Related

Copy And Paste Results Of Calculation On One Sheet To Another

Feb 22, 2014

I am having trouble copying and pasting the results of a calculation on one sheet to another sheet. I believe my problem is that my destination cell is actually two cells merged so the destination is obviously not the same size as the source. Here is the section of code I am working on:

Code:
Sub CalculateDeviceFailureTimes()
'
' Used to manipulate the UEM data file to find the outage times of different devices in the Astro System
'
Dim Output As Integer

[Code] .......

Like I said the section after the initial 'If' works and 0:00:00 is entered into the cell D15 with no issue. My problem comes when I try to copy the result of the formula in 'G3' to 'D15'. Like I said I believe my problem is that 'G3' is a single cell and 'D15' is two cells merged..

View 3 Replies View Related

Copy VLOOKUP Results & Paste Into New Workbook

Jun 12, 2009

Is there to copy my vlookup results into another workbook?

I put together a marco that will select an range and paste it into a new document, however my vlookup results will not copy over.

Is there a way to extract my vlookup results and paste it into another workbook with the enclosed vba code?

Private Sub CommandButton1_Click()
'
' Macro2 Macro
' Macro recorded 4/24/2009
'
Columns("A:E").Select
Range("A2").Activate
Selection.Copy
Workbooks.Add

ActiveSheet.Paste
End Sub

View 9 Replies View Related

Copy Filtered Results & Transpose In Many Workbooks

Aug 20, 2006

I have a folder with 250 files. Each of the file has only one column. I need to search the rows starting with "Party Name" and copy them in any one row. I want a macro either to copy the filtered results in the same file or a fresh workbook.

Column A
row 1 ABCDE
row 2 FGHI
row 3 Party Name:Abcd
row 4 JKLM
row 5 nopq
row 6 STUV
row 7 Party Name:ryz
row 8 Party Name:mno
row 9 XYZ

I want the results as below:

Column A Column B Column C Column D
row 1 ABCDE Party Name:Abcd Party Name:ryz Party Name:mno

View 9 Replies View Related

Copy/Paste Filtered Results Less Header Row

Sep 2, 2006

Trying to paste filtered results except header row. My code below pastes the header row for "Details" 2x. I tried altering the row to row 2, but that caused incorrect results to be returned.

Detail - Sales
First I filter the data range for " Total Sales"
Paste the results with header row to wsDetails

Details - Details
Then filter the data again for "N"
I would like to paste these results to wsDetails w/o the header

Option Explicit
Sub comp_pl_ytd_Totals()
Dim wbBook As Workbook
Dim wsData As Worksheet
Dim wsTotals As Worksheet
Dim wsDetails As Worksheet
Dim wsExtract As Worksheet
Dim rngData As Range
Dim rngCrit As Range
Dim rngDest As Range
Dim arrCrit
Dim myRange As Range
Dim C As Range
Dim lngrows As Long
Dim strFormula As String
Dim rngCase As Range
With Application
. ScreenUpdating = False
.DisplayAlerts = False
.Calculation = xlCalculationManual
End With................

View 4 Replies View Related

Filter Table And Then Copy The Results Onto Another Worksheet

Jan 17, 2007

now i have filtered data in a table, i want to use the results by printing off a table showing just these and the appropriate rows from other tables on worksheets. these all have a specific ID which is how they are traceable to each other. like a related field in an access database. two tables/worksheets are like so:

table1:
Reg No | Rank | Name | Initials | Troop | etc

table 2:
Reg No | JCLM1 | JCLM2 | SCLM1 | SCLM2 | etc

If i were to filter the second table by JCLM1 = YES then i want to create a printable list of all those but also to include the related records from table 1. is this possible?

View 2 Replies View Related

AutoFilter Copy Code Producing No Results

Aug 9, 2007

I have created a macro some time ago that is an integrated part of an XLA. The Xla has worked fine but now, for some reason, the macro fails to import the specified text, it doesn't fail but nothing gets imported. I have tried solving this myself, but alas I am not bright enough

The code is:

Sub GetWorksheet()
Dim filetoopen As String
Dim wb As Workbook

filetoopen = Application _
. GetOpenFilename("XL Files (*.xls), *.xls")
On Error Resume Next

View 5 Replies View Related

Copy Advance Filter Results To Another Sheet

Aug 29, 2007

I recorded a macro to perform an Advanced Filter. I then adapted the range to & LastRow. My question is, can this now be adapted to remove the Select so the sheets are not selected when this is run.

Sheets("CIT Results").Select
Sheets("Open Calls").Range("A1:I" & LastRow).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Open Calls").Range("N5:V8"), CopyToRange:=Range("Q50"), Unique:=False

Moderators, can you please edit the Thread title. It should be "Advance Filter From and To Non Active Sheet"

View 6 Replies View Related

Search Multiple Sheets And Copy Results To New Sheet?

Jun 13, 2014

I have a workbook with 50+ sheets. Within each sheet are rows of data in column A that I'd like to search for specific text.

I'd like to search each row from every sheet for specific words (e.g. "7 days" AND "Monday" AND "Tuesday" etc.) then copy the entire row containing all my search text in a new sheet on column A along with the name of the sheet it was found in in column B and the row number it came from in column C.

What I am trying to accomplish is to search through all the sheets and post results in new sheets for each search string.

View 14 Replies View Related

Copy Rows From One Sheet To Another Based On Formula Results

Feb 7, 2014

I have a report that is run weekly that shows items that have been returned over the last 3 months. The report shows the original date of purchase and the return date, but not the number of days since the purchase and the return. I need to have any items that were returned over 15 days go to a new sheet and display just those rows of information.

View 8 Replies View Related

Use AutoFilter To Filter And Copy Results To Existing Worksheet

Apr 5, 2013

I got the following code from Use AutoFilter to filter and copy the results to a existing worksheet and would like to incorporate this into my VBA project. The problem however is that this code were written to perform on one workbook and this is where my problem is. My project is between two different workbooks and cannot seem to get this code modified to do what it is supposed to do between these two workbooks. Everything I have tried so far failed. In short what this code would do is to check the existing data on the one sheet (the source) and extract only the data which is meeting my set criteria, and copy this data to the destination sheet. This is what I would like to do between two workbooks. With this the sample code as provided by Ron de Bruin. The sample workbook could be accessed trough the following link [URL]..... With this the code for matching and copying on one workbook.

Code:
Option Explicit
'>>
'This example will copy the filter results below the existing data on the destination sheet.
'Note the sheet "RecordsOfTheNetherlands" must exist in your workbook.
'This example will not copy the header row each time so when you manual add the worksheet
'"RecordsOfTheNetherlands" to your workbook you must add the headers yourself on the first row.

[Code] ............

View 1 Replies View Related

Match Values Between 2 Sheets, Copy All Corresponding Data & Sum Results

Feb 2, 2009

I want to locate the corresponding acct number between worksheets “primary_data” and “qty_movement” and once a match is found (from acct worksheet) then copy over the acct numbers and the share data to the results page. If there is no match I don’t want anything copied to the results page, just ignore that data on either worksheet “primary_data” or “qty_movement”.

•Both ranges on “primary_data” and “qty_movement” worksheet are variable, as accts are left off or kept on depending on the daily activity so the ranges are never set.
•I need to concatenate on “primary_data” worksheet cells A&B&C to get acct number
•concatenate on “qty_movment” worksheet cells B&C (need to keep zeros in front of actual numbers for acct number reasons)
•these accts need to be cross referenced as the accounts on the “acct” worksheet (pre-populated with corresponding acct numbers that never change and will always be on that worksheet)
•If a match is found on the “acct” sheet then I would like it to either replace the acct so they match on both worksheets or just to recognize those accounts correspond with each other and do the below.
•then take the 2 concatenated acct numbers off of “primary_data” and “qty_movement” in the I cells and copy them over to the “results” worksheet as well as the share data from “primary_data (column E)” and “qty_movement(Column D)” and then compare the 2 share amounts on “results(column E)”

i need to elaborate on anything, the attached sample sheet shows what i want to do, but without any formulas or code.

View 5 Replies View Related

Apply AdvancedFilter To Several Sheets & Copy Results To New Worksheet

Nov 30, 2009

The data to be filtered is in several sheets, and once filtered is to be copied to a destination sheet (in this case "Temp"). The criteria for advanced filter is on an altogether different sheet (in this case "Reports"). The macro is actually simplified for the purpose of the question, and I want to re-use the code several times, hence the use of variable "filterRng". When I run it, I get the subject error at the bolded line in the code below. I'm thinking that the Advanced Filter doesn't like a variable as a range reference, as it runs perfectly well if the commented out line below the problem line is used instead.

Sub Test()

Dim i As Integer
Dim rngData As Range
Dim filterRng As Range

Set filterRng = Sheets("Reports").Range("A121:K124")

Application. ScreenUpdating = False
Application.DisplayAlerts = False

View 4 Replies View Related

Apply Multiple AutoFilters & Copy Filtered Results

Aug 22, 2006

I have a vertical list of data which is sorted in to "Regions" 1 to 7 there could be up to 25 instances of each Region, but I have no way of knowing.

I want to be able to select each Region and place it in it's own column.

View 9 Replies View Related

Find & Copy Multiple Results Into Single Cell

Sep 29, 2007

I have a macro which scans column "AV" in Sheet1 and if a particular value is found it will copy certain cells from that row and paste them into Sheet2 on Row 10 starting with column "E".

With the current code I only paste a single instance, if the value is found more than once I only have the last one pasted. How can I best set this up so it will paste ALL found value results within Row 10?

The four copied results do not have to be in separate cells, it is actually best if the cells are combined. On Sheet2, cells E10-H10 can also be setup to have the data pasted across all four cells and that way Row Height AutoFit would take care of expanding the row's height to accommodate the possibly of having four or five sets of results being combined together and pasted into E10.

Rather than the typical result appearing as:

[TABLE]______E___F___G___H
10__1223 122 2222 2222
11__343 565 4554 5990
12__9755 334 6787 6788[/TABLE]

It is better for me if the data appears like this:

[TABLE]_____E____F____G____H
____1223 122 2222 2222, 343
10__565 4554 5990, 9755 334
____6787 6788
[/TABLE]

Is this even possible using a macro? It is currently being done using a Word document but I am wanting to automate the process and try to handle all the data sorting within Excel, if possible.


Sub Number()
Dim colSearch As Range
Dim celVal As Range
Dim celRow As Range
With Sheets("Sheet1")

View 9 Replies View Related

Saving Workbook On Shared Drive Results In Second Copy

Dec 4, 2007

When saving excel workbooks in our shared drive, a second copy of the workbook (with an unusual name) is being saved in addition to the original copy. Why would this happen?

View 7 Replies View Related







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