Search Multiple Files & Return Corresponding Value

Sep 21, 2007

I have a bunch of quotes in Excel format which have 5 columns ; Part number, Description, Qty, Cost, Total Cost, Unit List,Total List. I need a piece of code to open many excel files, look for a "part number" beginning with ED,DS,AP,MP or MDS and return the corresponding value in the "total cost" column then record the value in a separate spreadsheet.

View 2 Replies


ADVERTISEMENT

Search For A String In Multiple Files

Apr 17, 2013

I require the code for the following task.

I'm getting an input string from the user in an excel sheet(e.g. input.xls) .I have to search for that string in a group of excel files present in the same folder in which the input.xls file also present.The range of that cell in which the string is found (e.g. A1 ) has to be stored in a variable.

I know that Vlookup is an option but the number of excel files to be searched is more that 50.

View 1 Replies View Related

Search Value In Multiple Text Files

Jul 29, 2006

I have patent numbers in column A of an excel sheet and would want to locate or search the specific text files (located in my D:Files folder) containing those values. If the value is found in myfile1.txt then the result should be outputted in column B containing the filename of the text file. For example:

Column A Column B
us20061234556b1 myfile1.txt
us20061434455a2 myfile2.txt
wo200612344556A myfile3.txt

View 5 Replies View Related

Search Through Multiple Excel Files And Get Data?

Mar 10, 2014

Currently using the following code to "pull" a range data from a closed workbook.

[Code] ......

This works well if I know which workbook and sheet I will be getting the info from. What I would like to do is add a function that searches through a few workbooks looking for a worksheet name that matches a value in a cell in my original workbook.

ie. Workbook 1, cell A1 = "Jelly"

search through excel files for the workbook that contains the worksheet named "Jelly" and then copy a range from that worksheet back to workbook 1.

View 2 Replies View Related

Search For Multiple Text Strings In A Cell - Return One Of Multiple Corresponding But Different String

Mar 11, 2014

I have a spreadsheet with 1,000 rows of data.

Each Cell in Column A has a different long text string.

I need to see which (if any) of 10 specific small text strings exist within each long text string. Depending on which small text string is found I want to return a 3 digit code. If no small text string is found I want to return "Not Found"

E.g.:
- Cell A2 contains "randomtext,randomtext,APPLE,randomntext"
- I want to see if Cell A2 contains any of the words APPLE, ORANGE, CARROT.
- I want to return "APP", "ORG", "CAR" or "Not Found"

Q: What is the most elegant way to accomplish this within a single formula that I could paste into each cell in Column B?

View 2 Replies View Related

VB- Search Directory, Update Master File From Multiple Files

May 16, 2007

Here is a project I can’t seem to do on my own if you can point me in the right direction I would be grateful! here is the best suedo code to describe the needs of the script:

In the open workbook named MASTER, on Worksheet named -MASTER- ( Let’s refer to this all as just MASTER)

(In production, the name of this workbook will be an account #_ date, and the worksheet will be a date)

For each numeric value in row 6 (we’ll call these values AD###) of MASTER

'*****Part one of routine*****

Search directory "H:AccountingAdvertising Accounts" for workbook named AD### AX.xls

(Note the AX suffix of the file name)
If match is found open workbook and proceed to Part two

If match is not found, goto Private Sub AD_MISSING

'*****Part two of routine*****

View 10 Replies View Related

Return Multiple Values Using Three Search Criteria?

Jun 9, 2014

I'd like to extract the data from Sheet 2 (Data) that falls within the selected date range but the formula I've entered in F$9 (see below) is giving me an error

=IF(ROWS(A$9:A9)>$A$5,"",INDEX(Data!A$2:A$387,SMALL(IF((Data!$A$2:$A$320>=$A$2)*(Data!$A$2:$A$320<=$B$2)*(Data!$B$2:$B$320=$C$2),ROW(Data!$A$2:$A$334)-ROW(Data!$A$2)+1),ROWS(A$9:A9))))

test1.xlsx

View 3 Replies View Related

Search Table With Multiple Criteria And Return Row

Nov 10, 2009

I have been working on a variation of this for a long time and I cannot get it to work.

I am trying to depending on the textbox selection get the proper ROW from DEALLIST to show up.

View 2 Replies View Related

Find To Search And Return Multiple Dates

Jul 31, 2007

I am working with a macro into which you input a date, the macro searches for that date (in column D of the data sheet), then copies any row with that date onto a new sheet.

This works great, but now I need to be able to search for more than one date at a time and return any rows that cantain ANY of those dates. For example, I would want to search for any row containing 01/01/07 - 01/07/07 or any row containing 01/01/07, 01/02/07, 01/03/07...01/07/07.

View 9 Replies View Related

Search Multiple Sheets For Text And Return Sheet Name

May 7, 2013

I have a workbook containing multiple sheets for documents issued to manufacturers. I have a summary sheet which contains all of the documents and I would like to be able to look up a document number against all the sheets, and return the name (or names if multiple finds) of the sheets containing this document.

I have got close to solving this by finding another post[URL] .... but I believe this doesn't work because it searches on values rather than matching text.

I have attached a simplified example file with the sheets to search being Fab 1, Fab 2 and Fab 3, and the formula need to go into column B of the Main Sheet.

Example for Ozgrid Forum.xlsm

View 6 Replies View Related

Return Multiple Values That Match Single Search Criteria?

Nov 28, 2012

Attached is a sample workbook, but essentially what I'm looking to do is automate the process of searching through a data set where the value of interest (in this case, names) often has multiple entries, with different values attached to each instance.

I would like to be able to get a list of all values in a given column that match a specific name in another column.

Currently I'm using a basic INDEX/MATCH search just to see whether the data exists at all, but that's only half of what I have to do here, and I'm totally stumped on how to get a comprehensive list of all matches.

For reference, if you look at the sample, what I need is a list of all values in the "CPT" column that match the name searched for in the first column.

The actual data set size is at most 3-400 entries, if that makes a difference in how to approach this.

CPT Sample Book.xlsx

View 4 Replies View Related

Search Text String And Return Value Based On Multiple Criteria?

Apr 8, 2013

Here is an example of the data I get each day Letter order granting Sabine Pass Liquefaction, LLC's et al 4/16/12 request to add an alternate water source etc under CP11-72.Letter order granting Cameron LNG, LLC?s 4/5/13 filing of a request to introduce natural gas or process fluids into the BOG Liquefaction Project under CP12-15.Letter order accepting NorthWestern Corporation's 8/7/12 submittal of revisions to its transmission planning process to comply with the Commission's June 8, 2012 Order under ER11-2932.Letter order approving Public Service Company of New Mexico's 12/7/12 filing of a joint Offer of Settlement with Navopache Electric Cooperative, Inc under ER11-4534 et al. How can I set up my spreadsheet and what formulas can I use to search and return a value for each text string based on the attached table (column B)?

E3a7qta.png

View 1 Replies View Related

Search Workbook For Cells That Meet Multiple Criteria And Return Results From Rows

Jun 28, 2013

I would like to perform a search on only the worksheets listed in a worksheet titled table of contents. I would like to use multiple criteria for this search and send only the unique results to a worksheet titled results. Each worksheet listed in the table of contents has a cell address for each heading that I would like to extract data from the same column. The attached workbook example shows the data that I would like to collect when I search for cells that begin with "AB" and cells that begin with "CD". I collected this data by copy and pasting all the data from each worksheet into the results page and then applying filters and advanced filter to remove duplicates. This method does not work well for the original workbook as the data is quite extensive.

Create_List.xlsx

View 4 Replies View Related

VBA - Search For Multiple Text Strings In Data Field And If Matched Return One Word

May 7, 2014

I have hundreds of records of customer info and I am trying to categorize the job titles so that I can conduct some analysis with a pivot table. My problem is that there is about 20 different ways and variations of "manager" so Instead of autofiltering for "mrg." "Manager" "marketing manager" ect. and then replacing the text manually and using the enter and fill process (to create some standardization to compare "manager" to "director" to "c-level" to "consultant", etc.) and repeating this process over and over again...

I would like to create a VBA that would search the column "job title" for multiple text strings at once and if the text string was true in the cell then the cell would be replaced by a new text string "Manager". I was thinking a series of if functions within one vba but I am not sure if this is possible.

View 8 Replies View Related

Add Cell Content Into Formula Command In Another Cell For Multiple Files Search

Apr 12, 2014

How to determine the correct formula for this requirement?

Assuming I have 2 individual excel files and an index excel file (in reality, there are more than hundreds of file). For index excel, once the user enter part number (eg. 1 or 2), the excel will look for the part number excel file and determine vlookup function.

The only problem I have here is I can not make the index file automatically add the part number shown on most left column into the required formula (replace the part number file section).

I tried use the indirect function but this require each file to be opened, which is not possible for actual use. I am looking for a function that can work in closed worksheet.

Attached files :
index.xlsx‎
1.xlsx‎
2.xlsx‎

View 2 Replies View Related

Search CSV Files For Word & Make .xls Files Of Them

Jan 23, 2008

I have 22 CSV files. I want to search each of those files for a specific text string (ie: "profile" or "description"). When the macro finds the word in any one of the CSV files I want it to copy that complete csv worksheet and paste it into an excel xls file.

how I can go about doing this. Not also that while vlookup is possible, its very time consuming if i have to do this 50 times over and each time the csv files have different file names. that is why i want to search within a file (each file has its own unique identifying text string)

View 2 Replies View Related

VBA - Carry Out Task On Set Of CSV Files - Return Values And Leave Files Untouched?

May 14, 2013

Trying to write a script to carry out a number of tasks but is there code to enable an Excel to look in a particular file for the list of csv files - carry out the tasks and return the appropriate values in the Excel sheet whilst leaving the original csv files untouched?

View 2 Replies View Related

Search For Value In Multiple Column And Row Array And Return Value In First Column?

Dec 16, 2013

I have an array 20 Rows x 42 Columns, which contains a competition draw.

I need to search this array for a unique value and return whatever the time is in the first column on the same row as the value appears, and enter it into column C in the Womens Times sheet.

I also want to return into column D the court number from row 3.

The reason i want this automated is as teams enter / withdraw we may need to drag the games from court to court to fill gaps, so i want the Womens Times sheet to update accordingly.

I have been messing around with index and match, but cannot quite get it to return what i need.

I have attached an example ... on the sheet "Womens Times" in column A there is a list of game numbers ( #1W etc etc) indicating womens game #1 and so on. The main sheet i am using also has a seperate tab for the mens games, hence the designator of W or M on the end of the game number.

View 2 Replies View Related

Search Folder For Files Containing &quot;Temp&quot;, Delete Files

Jun 26, 2008

Is there a code that will search a pre-determined folder for all .xls files containing the word "Temp", and deleting those files?

Example:
In the root of drive M, I have several Excel files. Anytime one of the original tracking logs is opened, a temp file of that log is automatically created. I would like to automatically search the drive and delete all files containin the word "Temp".

I've attached a picture of the directory tree, in case that will help. The file will always be named "PO Response Tracking - Temp#######.xls", with ###### representing a series of either 5 or 6 numbers.

View 14 Replies View Related

Copy And Rename Files In VBA By Searching Multiple Folders For Files?

Jan 4, 2014

how I can loop through folders to select files starting with a certain word and copy all of them to a different folder and rename them. The folder structure is given below

Company 1(parent folder)
North South East(sub folder) West(sub folder)
Jan Feb Mar.... Dec Jan Feb Mar.... Dec Jan Feb Mar.... Dec Jan Feb Mar.... Dec

In the above structure, the files are present inside each folders Jan, feb...Dec under the regions North, South East n west. note that I have to select files starting with "Sales" and copy them into a new folder(say results) and rename copied files as Sales1.xls, Sales2.xls etc. (Files are not present in the folder company1, north, south, east and east.)

View 1 Replies View Related

Save Ranges In Multiple Files To Text Files

Dec 21, 2007

I have a excel file that I enter information into. I have code that saves the files to a certain folder with the name, date, and time stamp for the file name. At the end of the day I might have 3 to 15 excel files I have created that day and I would like to take information from certain cells (examle: L3, B6, B7, B8, G8, and so on) and create a txt file with all of the information in it.

Example:
12/20/2007
Your Name
123 Somewhere St.
Here, OH 45111
Home Visit

12/20/2007
Someone Else
345 Anywhere St.
There, OH 45211
Hospital Visit

View 9 Replies View Related

How To Create Search Macro Button That Allows To Search In Multiple Worksheets In One Workbook

Oct 11, 2011

Im am trying to create a search marco button that allows me to search in multiple worksheets in one work book. I came across this CODE the first part of it works. It pops open user input box and ask for the word that i would like to search but the this error message pops up Runtime error1004 Method 'range" of object'_Global'failed and i dont know what to do

Private Sub SearchButton_Click()
SearchString = InputBox("Enter Search String", "Search")
If SearchString = "" Then Exit Sub
For Each c In Range(myRange)
If InStr(LCase(CStr(c)), LCase(SearchString)) Then

[Code]....

View 1 Replies View Related

Search Multiple Worksheets Against List Of Non-Exact Search Criteria?

Nov 2, 2009

I have a workbook with many many sheets in it. The first sheet contains a single column with about 10,000 different values. I'd like to use each of these as search criteria against ALL data in the other sheets (of which there are a good 50 or so). If matches are found (they don't have to be exact case), then I'd like two things to happen:

1. The rows containing the matched search criteria in the first sheet are highlighted.

2. In the cells adjacent to the search criteria in the first sheet, hyperlinks to the matched data are created and named after the sheet upon which this matched data appears.

I've attached a sample file to this post with ideal sample 'answers' to queries made of the first 2 terms.

View 3 Replies View Related

Convert Multiple Files To Text Files

Sep 26, 2007

I have about 100 Excel files in one folder that need to be saved as text files. They can keep the same name, but simply need to be converted to text files. I'd like to use VBA for this and I can't find examples that do exactly that...or ones that my limited knowledge can handle.

Excel files exist in C:Source and ALL of them should be saved as text files in C:Destination. Maybe there is an easier way, but I thought for sure there was a routine I could use.

View 4 Replies View Related

Search For Only XLS Files In A Folder?

Jun 18, 2013

I found some code on here the other day which will do though all the files in a folder and send them to a zip file which works great how to zip a single fixed file. I down load files from our oracle system daily and need to keep them but want to keep the file size down.

Code:

Sub ZipPackage()
Dim ZipFile, TargetFolder, NewFileName, ofile
Dim o As Object

[Code]...

But the "ofile" doesnt contain the file type. Is there away to adjust this code so it recognises what the file type is?

View 6 Replies View Related

Search In Text Files

Sep 15, 2009

i have a txt file see attached and i need macro to:
1)open the file
2)find the word "Dimension no: 3"
3)go 2 lines dwn and copy the number " 64.999"
4)paste it into excel

file:me.txt
Dimension no: 1
Plane:PL1
Flatness 0.003 0.200 *---
--------------------------------------------------------------------------------
Dimension no: 2
Circle:CR1
Diameter 113.001 113.000 +0.000 +0.300 0.001 *--+---
--------------------------------------------------------------------------------
Dimension no: 3
Circle:CIR0
Diameter 64.999 65.000 -0.300 +0.300 -0.001 ---*---
--------------------------------------------------------------------------------
Dimension no: 4
Plane:PL1--Plane:PL3
Lengthavg 15.500 15.500 +0.000 +0.100 -0.000

View 9 Replies View Related

Using The =IF(ISNUMBER(SEARCH Function To Search Multiple Cells)

Aug 21, 2009

I' having trouble using the =IF(ISNUMBER(SEARCH formula to search multiple cells.

I can get it to work to search one cell (as below):

=IF(ISNUMBER(SEARCH("Same",G10)),"No Change",'Aug 09 Matrix'!F10)

(In this case the respone is No Change as Cell G10 contains "Same")

However cannot get it to work for several cells. I have pasted below and highlighted the function I would like it to perform:

=IF(ISNUMBER(SEARCH("Same",G10:R10)),"No Change",'Aug 09 Matrix'!F10)

Essentially the other cells in that row (G10:R10) all contain "Same", however for some reason it is identifying this as FALSE and putting in the data from the 'Aug 09 Matrix' sheet.

View 9 Replies View Related

Search XLS Files And Then CUT And PASTE To New Location

Nov 23, 2012

I have a folder with many subfolders and I want to search ".xls" files from these subfolders and then cut and paste them to new location. There is a code available over interned for searching files in folder but apparently it does not work in newer versions of Excel.

View 5 Replies View Related

Search Folder For Files In 2007

Aug 19, 2008

On this forum I read about the application "FileSearch" that doesn't work in office 2007. I used the macro on below in office 2003 and it worked. Now I upgraded to Office 2007 and it doesn't work. But if you search "NewSearch method" in the MS Excel Help you can find that the application exists and it has the same morphology I am using!! Why Doesn't it work??

With Application.FileSearch
.NewSearch
'Change path to suit
.LookIn = pPath
.FileType = msoFileTypeExcelWorkbooks
.Filename = "*.xls"
If .Execute > 0 Then 'Workbooks in folder
Redim FNameArr(.FoundFiles.Count).......................

View 2 Replies View Related

Search Folder For Files & Open Them

Oct 5, 2007

I don't seem to be able to combine the looping through a set of workbooks with the IsFileOpen function posted by microsoft.

Basically this code works if the foundfile(j) is closed, but if it is already open I cannot activate the foundfile(j) and make it do things.

I'm not posting the ISFileOpen function because already present inside the forum and the rest of the code because it's too long...

With Application.FileSearch
.NewSearch
' . ScreenUpdating = False
.LookIn = MyPath(40)
'* represents wildcard characters
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then 'Workbook exists
For j = 1 To .FoundFiles.Count
If IsFileOpen((.FoundFiles(j))) Then
'neither of these three options work

View 4 Replies View Related







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