Find Across Multiple Sheets

Jul 31, 2008

I am using the following code to search a worksheet for a 10 digit number (derived from input box). I would like to expand the search to more work sheets (i.e. Sheets(4) to sheet count). There will only be one entry for each input number in the above work sheets. What is the best way to ammend the code?

num = InputBox("Scan Transfer Tube")
If num = "" Then Exit Sub
Set r = Cells.Find(What:=num, After:=Cells(1, 1), LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext)
Rows(r.Row).Copy

Sheets(2).Range("A2:S2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Sheets(3).PrintOut Copies:=1, Collate:=True

View 4 Replies


ADVERTISEMENT

VBA - Find A Value In Multiple Sheets

Oct 2, 2012

In Sheet1 A3 values which I want to find value

In sheet2,3,4 are DB

For example I looking for AVAI and if AVAI is in Sheet2 copy or just showing a row where is AVAI value and these VBA should find in all Sheets (2,3,4).

Just I want to find data in other sheet and show in one sheet.

View 1 Replies View Related

Find Lowest Value From Multiple Sheets

Jul 13, 2009

Im creating a list of cash and carry places to buy drinks but im so clueless on how to go about doing it.

Heres the situation:

In sheet 1 I have a list of Drinks and the prices the shops are selling it for.
I have duplicates of the drinks so say for bacardi i would have one row with one shop with its price and another shop with another price. I cant put it into columns because there is other information such as the quantity the shop sells in one box etc.

On another sheet (sheet2) i have a kind of shopping list. This has all the drinks listed in Sheet 1 as mentioned above but NO DUPLICATES. What i need it to do is find the drink is Sheet 1 and pick the row with the lowest price from the multiple entries and copy that price and shop name over to sheet2.

I hope this is easy to understand. Please let me know if I need to explain some bits again. Im trying my best to figure out how to do this. I have no clue how to do it in Access.

View 14 Replies View Related

Find Across Multiple Sheets/Worksheets

Sep 3, 2006

Is there a way to use the Find tool (Ctrl + F) to search across multiple tabs (they may be called worksheets) in a single workbook?

View 2 Replies View Related

Find Highest Value Across Multiple Sheets

May 26, 2007

I have a workbook that contains sheets of sales data from year to year. Each sheet has the same data in the same range of cells. For example b2 thru b26 would contain the sales for Day 1 of a route system for each week of the year, and each sheet in the workbook contains the same data in b2 thru b26 regardless of the year (2006, 2007, etc). I would like to be able to have a cell that would contain the record high sales for that particular route day, but have a formula that would watch that column and change the value in the selected cell when a new high was entered.

Is there a way to check the range of cells for a high value, or would I need to check each cell against the current high value in the cell with the record high, and how would I go about constructing this formula? Or as I'm now thinking about it, would this be more of a job for a macro that would run when data was entered?

View 9 Replies View Related

Find Dates Over Multiple Sheets

Jun 21, 2008

I have 3 sheets in my workbook. (List, Half 1, Half 2)

I am using the following code to search from a list of dates which is in the list sheet, and then find them on the other two sheets.

My code works fine until the 7th date, and then I get a runtime error 91.


Sub Find_Date()
Dim Variable, Variable2

Sheet1.Activate
Range("Y14").Select
Start:
Sheet1.Activate
ActiveCell.Offset(1, 0).Select
Do While ActiveCell.Value <> ""
Sheet1.Activate
Variable = ActiveCell.Value
Sheet5.Activate.....................

View 9 Replies View Related

Find Duplicate Values In Multiple Sheets?

Aug 23, 2013

I have 2 sheets that i need to find what the same valued cells are.

1 sheet has names and i need to find the rows where those same names are on the 2nd sheet.

The formats are different (upper-lower case) and there is additional text as part of the cells in the 2nd sheet. (i.e prod123.web.corp.com) and i just need to find the prod123 parts.

View 9 Replies View Related

Multiple Find And Replace Over An Array Of Sheets

Jul 6, 2007

I have a list of cell entries that I want to find and replace with different text or a number.
My code below is 4 of them.
I am trying to do the replace over 3 different sheets at the same time but I am only changing the 1st sheet with my efforts.

Sub Find_And_Replace()

Sheets( Array("Resolution", "Response", "Open")).Select
Sheets("Resolution").Activate

Cells.Replace What:="1 Widespread*", Replacement:="1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Cells.Replace What:="2 Critical*", Replacement:="2", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Cells.Replace What:="3 Non*", Replacement:="3", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Sheets(Array("Resolution", "Response", "Open")).Select

Cells.Replace What:="4 Require*", Replacement:="4", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

End Sub

View 8 Replies View Related

Find Value On Multiple Sheets & Delete Corresponding Range

Jun 11, 2008

I'm building a course registration workbook and am working on the unregistration macro.

I have a seperate worksheet for each course, labelled by the course code.

There is also a page for each registered participant that shows what courses they're in.

The macro reads off the information on the participants page, and then should goto each registered course's page, look in column C for their name, find it, delete the contents of that row for Columns C to G (has their other information) and then shift all CELLS (not rows) below the now deleted cells up 1 to keep track of the order they were added.

I've tried recording my own macro and editing... but it doesn't work very well for this.
I've also tried searching and come up with nothing, but if someone can look at my code, and/or point me in the right direction, it would be greatly appreciated.

For Each ws In Worksheets
'checks only course sheets that match the courses the individual is registered in.
If ws.Name = unregisterCourse1 Or ws.Name = unregisterCourse2 Or ws.Name = unregisterCourse3 Or ws.Name = unregisterCourse4 Or ws.Name = unregisterCourse5 Then

'Should search for the variable "unRegister" in column C and select it.
Cells.Find(What:=unRegister, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select

'Now needs to select the four cells to the right as well (C:G) and delete them

'Select all cells below from C:G and shift them up one.
End If
Next

View 5 Replies View Related

Find And Highlight Duplicate Values In Multiple Sheets

Aug 22, 2013

SM extract 8.21.2013 Cust-sample.xlsx

I want to highlight the cells under System Name (col 1) in sheet 1 that are found in Host (col 1) in sheet 2 "OCPtabvHost"

The text isnt in the same format in the 2nd sheet (it is lower case and has additional text). I need to find the duplicate roots

View 8 Replies View Related

Find And Replace Matching Cells Across Multiple Sheets

Dec 11, 2013

Following Excel task I am trying to complete:

I have an Excel file with multiple sheets and I want to find and replace matching cell data on the same row across all of the sheets. For example, I have two columns, Column A and Column C and 10 sheets. I want to only replace the content in Column A if text matches both Column A and Column C on the same row. So, I want to be able to search for the following data across all sheets:

Column A = "car"
Column C = "yellow"

If both "car" and "yellow" are found in Column A and Column C on the same row, then replace "car" in Column A with "truck".

Is there a way to do this automatically as I have few hundred to find and replace?

View 5 Replies View Related

Search Multiple Sheets Within Report And Then Find Average Of Result?

Jun 6, 2014

Average.xlsxHi

I have changed the attachment to use CSV's

I am trying to create a report that I can enter the codes I am looking for and the formula will search the sheets within the report and once the results are found then find the average of those results.

What I am trying to do is search the codes from Sheet 1 under Outlet and ESA(in Blue) in sheet A,B and C. The problem is the ESA code seen in column I of A,B,C is only used when column L is empty in A,B,C.

Once the relevant codes are found I then need to look for the KPI's seen in sheet 1 B4, B6 and B8, they can be found in A,B,C in column R. then the result comes from column S in A,B or C.

Once the result is found for each code I want to find the average of them, with the answer to populate in yellow in sheet 1

I want the formula to be able to handle more or less codes as well as adjust the formula so I can add more sheets(possible D,E,F,G etc)

View 5 Replies View Related

Find Common Values Across Multiple Sheets Based On Unique ID

Oct 24, 2013

The old thread is here: [URL] ....

There are three sheets in the workbook, Project, Tasks and Details and the expected resulting sheets are RESULT, In_Tasks_but_NOT_in_Projects and In_Details_but_NOT_in_Projects .

But now what I am looking for:

1. Copy the Projects data as is in the RESULT sheet.

2. Then in the Tasks sheet, if the ID matches paste the matching rows under the data from Projects (as in the result sheet with Orange colour)

3. If the ID is present in Tasks but NOT in Projects then copy it into the In_Tasks_but_NOT_in_Projects sheet.

4. Then If the ID and the Name in the Details tab matches with the data in the RESULT sheet then paste it under the ID and Name (as in the result sheet with Green colour)

5. If the ID does not match the ID in the results sheet then copy that row into the In_Details_but_NOT_in_Projects sheet.

The result of the current macro that RHCPgergo worked with are in the last sheet.

The formatting and colour of the rows doesn't matter, it is more of nice to have.

View 14 Replies View Related

Find Data & Paste In Pervious Column On Multiple Sheets

Dec 14, 2008

I have a workbook that has 397 sheets. On many of the sheets (but not all) they have some of the same data. On sheet 1 cell B5 is ContactID, Sheet 15 cell B32 is also ContactID. Sheet 1 A5 needs to reflect Contact ID and Sheet 15 A32 needs to reflect Contact ID. I need to find all sheets that contain the data "ContactID" and place (paste?) Contact ID in the same row, but in Column A.

Right now I am doing a Find all and clicking through the sheets 1 at a time (some of these finds though have 30+ sheets).

View 14 Replies View Related

Macro To Find And Replace Values Across Multiple Sheets In Same Workbook?

May 27, 2014

I have an excel workbook with 60 sheets (each contain data in the same categories and in the same column locations, just different information on each sheet). What would the VBA code look like if I wanted to manually enter the find and replace values and perform the function (find and replace) across multiple sheets in the workbook?

View 5 Replies View Related

Import Large Text File Across Multiple Sheets. Could Not Find Installable ISAM

Apr 19, 2008

I found following code on this site to extract txt files. As mentioned this code can extrack huge txt data to multiple sheets.

Sub ImportLargeFile()
' Imports text file into Excel workbook using ADO.
'If the number of records exceeds 65536 then it splits it over more than one sheet.
'If a file in a different format is to be imported amend the extension at line 10
Dim strFilePath As String, strFilename As String, vFullPath As Variant
Dim lngCounter As Long
Dim oConn As Object, oRS As Object, oFSObj As Object.............

However I am getting Run time error '-2147467259(80004005)': could not find installable ISAM for section 'Open an ADO connection to the folder specifiedin above code

View 2 Replies View Related

Select Multiple Sheets And If Value In Cell Is True Then Copy Values In All Sheets And Hardcode Data

Feb 26, 2012

I have a workbook that updates from external source and creates sheets depending on a cell range.

I have put tab 1 and tab 0 on either end of where the new sheets will be inputted, will never know how many sheets

What i need to happen is if someone fills in "complete" in A7 in my "summary" sheet then the values in row 6 in all the other sheets get hardcoded. This needs to happen from A7 down to A26, so A8 = complete then copy row 7 etc
This is what i have so far

I get compile error here ........Sheets(ArrSh(1)).Activate

Also need it to work for all the other rows.

Sub hardcode()
'
'Sheets("Summary"). Select
If Range("a7") = "complete" Then
'
Sheets(Array("1", "0")).Select
Sheets(ArrSh(1)).Activate

[Code] ......

View 2 Replies View Related

Run-time Error '1004' Method 'Add' Of Object ' Sheets' Failed Adding Multiple Sheets

Aug 9, 2007

I have been running a simulation for about 18 hours now and just received:

Run-time error '1004':
Method 'Add' of object ' Sheets' failed

I have been creating new sheets, importing data, pulling some values from the data then deleting the respective sheet. I am using:

ActiveWorkbook.Sheets.Add after:=Sheets(Sheets.Count)

The sheet is actually being added to the workbook, seemingly before the error. I resume the code, and a new sheet is placed in the workbook and it errors again. The Debugger stops and highlights on the code above.The sheet count number was 10895 at the error, just as an indicator of how many times the simulation has performed successfully. I am hoping this is something I can fix without having to start over...

View 9 Replies View Related

Printing Multiple Sheets In Workbook With Hundreds Of Sheets

Feb 18, 2014

I have a work sheet named "Main_List"...In column D starting with "D2" I would like to list worksheets that I would like to have printed via VBA.

The workbook has several hundred worksheets and I would like to list in column D only worksheets that I would like to print with VBA code.

View 3 Replies View Related

Copy From Multiple Sheets (26), PASTE To 1 Sheet From 26 Sheets

Dec 26, 2009

I have a workbook with 26 sheets, labelled A to Z. Column A in all the sheets have names from rows A6:A35.

I need a macro or a code to extract all the names from each of the 26 sheets and paste it to a new sheet 'Names' under column A, such that names starting with 'B' paste under all the names 'A' and so forth till 'Z'.

View 9 Replies View Related

Running Multiple Modules Across Multiple Workbooks With Multiple Sheets

Feb 19, 2012

I've got data being scraped from a site, putting 1 new workbook in a folder each day

each workbook has 40 sheets in it.

i need to run 5 modules in sequence on a sheet then loop to the next sheet and run the same 5 modules.

ive writen all the modules, and can loop them through the sheets in sequence but i cant work out how to loop them through the each workbook in the folder..

is there an easy way to do this or can it not be done because it would need access to the folder that holds all the wordbooks which lives outside of excel on the desktop ?

View 5 Replies View Related

Excel 2010 :: Macro To Save Multiple Sheets To Multiple PDF With Cell Value As Filename

May 6, 2014

I would like a macro to be able to save 26 tabs within the one document to individual PDFs.Preferably I would like to be able to specify each time exactly which tabs get printed, because often I don't need to print all 26, just the first 10 or so.I would like each PDF to automatically be named with the value in cell E10 of each tab.E10 already has a formula to create its final value. It references cells from other tabs within the same document. Hopefully the fact that this cell has a formula in it won't affect my ability to use the resulting value as a 'save as' reference?I would like it if the PDFs save to the same location as the Excel sheet from which they're generated is located. The location of the excel sheet will change every three months, so I'd prefer not to specify a location with a specific filepath, as it will have changed by the time I run the macro again.

I am using Excel 2010.

View 5 Replies View Related

Excel 2010 :: Counting Cells With Multiple Criteria On Multiple Sheets In Workbook

Aug 5, 2012

I am using MS Office 2010. I want to count---on multiple sheets---the number of times that a given cell is greater than another cell if and only if a third cell is equal to a given value. I want to do this for 4 sets of data on each sheet. I thought I had it figured out with this formula---

=SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$R1"),2*(AND("'"&$H$1:$H$43&"'!$E1">"'"&$H$1:$H$43&"'!$F1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$S1"),2*(AND("'"&$H$1:$H$43&"'!$G1">"'"&$H$1:$H$43&"'!$H1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$T1"),2*(AND("'"&$H$1:$H$43&"'!$I1">"'"&$H$1:$H$43&"'!$J1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$U1"),2*(AND("'"&$H$1:$H$43&"'!$K1">"'"&$H$1:$H$43&"'!$L1"))))

but it returns a value of zero each time. Clearly there is an error in the formula.

Here is some background:
-- $H$1:$H$43 is a block of cells that has the names of the sheets in the workbook
-- E1 and F1, G1 and H1, I1 and J1, K1 and L1 are the four groups of cells that I am comparing.
In the entire workbook, I want to add 1 (counting function) only when:
R1=2 AND E1>F1 or
S1=2 AND G1>H1 or
T1=2 AND I1>J1
U1=2 and K1>L1
on each appropriate sheet in the workbook.

View 1 Replies View Related

Excel 2003 :: Formula For Counting Values Across A Range Using Multiple Criteria Across Multiple Sheets

Feb 9, 2014

I have saved this on a 2010 workbook as I am at home but this will be used on a 2003 workbook.

I have several projects on one spreadsheet which multiple users will be working and I am trying to create a summary sheet of the work carried out.

Each user is expected to carry out a task on each row of the data held in each worksheet (research, call, update etc) and each task (Option 1-5) is assigned a value. Each user is expected to meet a certain level of points per day to calculate productivity.

I am looking for a sumproduct along the lines of the summary sheet attached but mine just takes one sheet into consideration and I need one for all sheets.

View 12 Replies View Related

Excel 2010 :: Lookup Multiple Criteria Across Multiple Sheets?

May 28, 2014

I have a Excel 2010 workbook used to rota in a large amount of staff for a call centre, which is split into four teams. Each sheet corresponds to a month of the calendar year eg Jan201, Feb 2014 etc..

What im trying to do is put in a sheet at the front of the workbook that I can select the team, which populates the list of staff in that team and then checking across a specified date range gives the shifts that those respective staff will be working for the set time period (probably be looking at a seven day period and a 1 month period). (This in turn will be printed out to give to the staff members.)

View 2 Replies View Related

Adding Multiple Cells From Multiple Sheets With Sumif Function

Jan 20, 2009

I'm trying to put together a spreadsheet that tracks disc capacity increases, affected by any incoming projects. I've managed to do so for one project, but would like to for up to 10. The way i've designed the solution (i'm sure there are far more elegant ways, but hey) is thus:

A forecast worksheet keeps track of a grand total, taking information from sheets P1 -> P10 (being projects 1 to 10). I am unable to figure a way to add up all the increases from all 10 project worksheets with one succinct formula. What I use so far is: ='P1'!C83+SUMIF('P1'!E82,"=2009 - Q1",'P1'!D82) ..................

View 5 Replies View Related

Count Unique Logs With Multiple Conditions Of Multiple Sheets

Oct 8, 2007

I've got no clue about all this, but I've had to get specific formula examples and fill in the blanks in order for my timesheet to work. There's just one final problem if somebody could please help.

This is a timesheet for a 5 day work week. I need to count the number of unique log numbers for a specific activity. The log numbers counted must be unique across the entire week, not just for each day, which means I want the formula to count the unique log numbers across multiple sheets.

The formula also has multiple conditions. I got 2 columns. The first part of the formula needs to verify a word, say, "split" and if it does it checks the adjacent cell for a unique log number. If both arguments are true, it counts the log as 1 unit.

Here is a working formula for only one page.
=COUNT(IF(D4:D29="split",IF(FREQUENCY(C4:C28,C4:C28)>0,1,)))

Here's 2 problems with this formula:
1. I will count if it encounters a blank cell in the Log numbers the first time (which will happen as not every activity we do has a log#), but it will stop counting if it encounters a second blank cell.

2. I don't know how to make it work across several sheets.

This is an alternate formula which works and skips the blank cells, but I don't know how to add the multiple condition of "split" and to have it work across multiple sheets. I just copied it Microsoft. As I said, I don't understand it, I just fill in the blanks.

SUM(IF(FREQUENCY(IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""), IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""))>0,1))

View 11 Replies View Related

Copy Multiple Ranges From Multiple Sheets And Paste In Order Via VBA

Apr 21, 2013

I've got several worksheets that all have the exact same layout that a user will enter unique information in to each worksheet. Then I've got a final worksheet that I want to have a button that the user can click and when they do, it will look to each worksheet and do the exact same process for each worksheet as follows:

It first looks to see if the worksheet is visible. If it is, I want it to copy the range A5 to K5 down until it gets to the last non-blank cell in column C. The first non blank cell that will be referenced will be C7. Then I want it to paste this information into the range A5:K5 on the final sheet named Sheet8 with the same values and keep cell formatting such as width and height, font. If the worksheet is not visible, it skips the sheet.

I want it to do this for each visible worksheet, placing the next visible worksheet info under the previous visible worksheet info. My current code as shown doesn't do that. It requires that something be inSheet8 A6 before it will even paste, then it pastes the info from A5:K5 but it doesn't do just the values nor does it keep the formatting. What I mean about not doing just the values is some of the info that needs to be copied comes from a drop down they can choose from and it copies the actual drop down menu. Also, it seems to copy all of the ranges from each sheet and paste it into just A5:K5 on Sheet8 and overwrites each other instead of pasting Sheet2 just below the information from Sheet1. So the only information shown after the entire process is completed is the information from the last visible sheet.

If Worksheets("Sheet1").Visible = True Then
Sheets("Sheet1").Range(Sheets("Sheet1").Range("A5:K5"),
Sheets("Sheet1").Range("C7").End(xlDown)).Copy
Sheets("Sheet8").Range("A5").End(xlDown)
End If

[Code]...

View 4 Replies View Related

Finding Multiple Values For Specific Individual Through Multiple Sheets

Jan 5, 2014

I am working with a nonprofit to set up their financial ledgers. There is one workbook with 12 sheets, one for each month. The goal is to be able to set up a formula that searches through all 12 sheets for every donation that a specific individual has made. For instance, let's say that John Smith gave x amount of money on 1/1/2000, y amount of money on 1/10/2000, and z amount of money on 2/2/2000. This data will appear on 2 different worksheets. I have the following formula, which allows me to look through one sheet at a time:

{=INDEX(Jan!$B:$B,SMALL(IF(Jan!$A:$A=Smith!$A$2,ROW(Jan!$A:$A)),ROW(1:1)))}

Where Column A in each sheet is individual name, and column B is amount donated. Sheet "Jan" is the data for the month of January, and sheet "Smith" is the culmination of John Smith's donations for the full year. Using this array function, I am able to retrieve all data for John Smith in the month of January, but I can't find a way to make one function that searches for all of John Smith's donations in each month. Is there a way to build an array function in VBA that would accomplish this?

View 3 Replies View Related

Combine Workbooks With Multiple Sheets Into 1 Multiple Sheet Workbook

Mar 16, 2008

I have about 20 workbooks with different file names for different projects all saved in the same folder. Each workbook has about 10 worksheets and each worksheet is named in a similar fashion in each of the 20 workbooks (eg. revenue, cost, variance etc.). I want to pull out a worksheet named ' forecast' from each workbook into a master workbook so that the master workbook would contain the 20 forecast worksheets.

View 9 Replies View Related







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