Macro - Search Sheets In Same Workbook And Highlight Data

Jun 20, 2014

I have a worksheet with multiple sheets.

Users and Data

In users column A has email contacts from people that accessed a recoding on line. I need to be able to cross reference with another sheet called data where I will have their full name.

Basically I would like a macro that will check column A in users sheet and check in data the name column . If it finds last name or partial name in the mail it will highlight it in the users sheet and in the name column in data

User sheet
Column A is raw 1 is heading username

data sheet
column B is raw 1 Last Name

That way I am able to quickly identify a group of people if they did not watch the recording as user gives me indication on what they did.

View 5 Replies


ADVERTISEMENT

Search Function (locate Data) Search All Sheets Within The Workbook

Sep 14, 2009

Using the search macro code below, could someone please help to add in more codes what I'm currently using, and also where to insert it. The Search function works well for what I need and it helps me to locate data. When using the search function somehow it search all sheets within the workbook but I only want it to search an array of sheets when using this macro that is needed to complete the task for what I'm after.

Macro
Public Sub FindText()
'Run from standard module, like: Module1.

Dim ws As Worksheet, Found As Range, rngNm As String
Dim myText As String, FirstAddress As String, thisLoc As String
Dim AddressStr As String, foundNum As Integer

myText = InputBox("Enter the text that you want to search for:", "Start Search!")

If myText = "" Then Exit Sub...................

View 9 Replies View Related

Search/highlight Macro

Dec 23, 2008

I'm having a problem getting this macro to work with the variants that have a letter in them. "A0220" and the like. All of the number only variants are found and highlighted just fine. What do I need to do to get the macro to find the letter ones? Here is the macro I'm working with currently.

View 11 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 ALL The Sheets In One Go On A Workbook

May 11, 2006

way of being able to search ALL the sheets in one go on a workbook? Going through all the sheets maybe one by one, i cant fathem it at all.

View 9 Replies View Related

Macro To Copy Data From All Of Sheets In One Workbook Over To One Sheet In Another?

Mar 10, 2014

computer just doesn't have the horsepower to run all of the sheets and the formulas and put them together on one sheet in the same workbook.

I was wondering if it would be possible to take the identically arranged sheets from one book and paste the VALUES over to One page in another book.

I'm guessing you'd need to know the directory of the workbook and the title?

Below is the macro i run to compile in to one page in same workbook: (Summary3 is an arbitrary name for the new page, HEADERS is the name of the page that holds the headers for all of the categories, 2014 URL, RAP and DB_Template are the three sheets that I don't want to copy in to this new page)

The headers are in each sheet from B2:DL2 and the data would be from B3:DL75.

I am looking for an update to the following macro that would paste all of the VALUES from each of these sheets in to a new workbook on a single page.

Sub CopyAll()
Dim ws As Worksheet
Sheets.Add.Name = "Summary3"
Sheets("Summary3").rows(1).value = Sheets("Headers").rows(1).value
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
If ws.Name <> "2014 URL" And ws.Name <> "RAP" And ws.Name <> "DB_Template" And ws.Name <> "Summary" Then
Range("B2:DL75").Copy Sheets("Summary3").Range("B" & Rows.count).End(3)(2)
End If
Next ws
End Sub

View 2 Replies View Related

Search To Data Ranges And Highlight Matches

Nov 11, 2013

I'm trying to create a leave calendar for staff. I would like to paste in the staff members sick and annual leave dates.

I would then like a conditional format that would highlight the leave dates onto the calendar, so i can visually track attendance and check for any sick leave patterns. My calendar looks like below for each month, and although it shows just the date in excel, i have formatted it so its actually the full date (ie instead of 1 it is 1/7/2013, but just displaying 1)

Jul-13
MTWTFSS
1234567
891011121314
15161718192021
22232425262728
293031

Whilst i can easily track and input the public holidays (on an individual basis) i'm looking to highlight the whole calendar area, say cells (c5:i10) as the search area and then have the leave data as a whole search area (at2:at150)

Above is part A of my question. To further complicate it, if it can even be done. The leave data i get from my system only has the start date of the leave, in another column it has the end date, and in another column it has days absent, if we can do it so it adds the days after (total leave days) to highlight in the calendar that would be amazing, if not, i'll just amend the data to have every date of the leave listed

Leave Type Start Date End Date Days Taken

View 6 Replies View Related

Method To Search Other Sheets In Workbook For Unique Row

Mar 26, 2013

My workbook contains a input sheet and multiple sheets with the data I compile. In the examples I provided, on each sheet "Server Name" is unique data to each sheet. I would like to have the ability on the Input sheet to click one of the server names and that take the user to the record on sheet 2. Not sure iif I need to be looking at a Macro or a formula to do this.

View 1 Replies View Related

Use VBA To Search Worksheets - If Value Is Found Copy Only Those Sheets Into New Workbook

Dec 5, 2013

I found some useful code for copying specific worksheets into a new workbook based on the sheet name, which I have not been able to alter to suit my needs.

I have a workbook that has a Master Sheet that contains a summary of each claim (Name, type of claim, dates, dollar amounts, etc.) and a sheet for each specific claim.

I know I can use the filter feature on the master sheet to view all of the physical damage claims (and one column has a hyperlink to the worksheet for that specific claim). But every month I have to create a report that shows each type of claim, dates, and so on.

I would like to create a macro that can copy the worksheets to a new workbook based on the type of claim it is. I'm thinking something like for each ws in wb if range ("F15") = 1 & .range ("B4") < 30 days from today copy that sheet into a new wb.

Below is a generic and far smaller version of my workbook. The name column contains my hyperlinks to the specific sheet. Each sheet is also named based on the text in the name column (so John Doe's sheet would be named 'John Doe') and so forth.

Date of Loss
Name
Cargo
BI
PD
Paid
Reserves

[Code] ........

View 1 Replies View Related

Vlookup Macro: Highlight The Cells In The In The Workbook

Jan 12, 2009

I have created a macro to open a workbook from another workbook and do a vlookup against the data in the source workbook. I then wanted to highlight the cells in the in the workbook that I'm doing the vlookup from, and to unhighlight any empty cells. I did this all without code using the macro recorder so that I could then study the code and learn something.

View 2 Replies View Related

VBA Macro To Search All Sheets For Value

Nov 19, 2009

I have attached 2 workbooks to illustrate the problem I am having.

One workbook contains a receipt. The macro is asking the user to input information into the receipt form, however one piece of information needed for the receipt, the balance due, needs to be pulled in from another workbook which contains the accounts receivable information for each family. Each sheet in this workbook is named the name of a child.

This is where I’m stuck. When the user inputs the child’s name I would like the vba code to search through the sheets in the second workbook and return the balance due for the name entered which is in cell “J42” on the sheet named the same as the child’s name the user entered.

Once it has found that sheet and entered the balance due on the receipt in cell “C10”, I would like the code to copy the amount being paid from the receipt cell “J6” to the next blank row in “Column H” of the Accounts Receivable sheet for that child.

The third workbook I have but wasn't able to include is a database I tried to create listing all the children because I was told that would be the best way to do this, but I couldn’t figure out how to get what I need from that document either. (I think trying to change how I was doing things in mid stream just made it more difficult and I don’t have adequate information in the database document to get what I need.)

The one other issue I have is making sure the user enters the name exactly as it is in the other workbooks, and I thought of having a dropdown box that pulls in the names from the database and having the user select the name from the dropdown box so it will be an exact match, but I have no idea how to have the macro allow the user to choose from a dropdown box.

View 9 Replies View Related

Macro To Create New Workbook And Sheets Inside Each Workbook

Mar 31, 2009

I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:

A B C
DAYTRIPCUST

I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.

How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.

View 9 Replies View Related

Macro To Search Whole Workbook?

May 8, 2014

I've had a look at various coding to create a macro to search excel.

The issue I have is several work sheets within the work book but they're always inactive unless opened. From the 1st work sheet I've got menu buttons that open a specific worksheet, then there's a button to click to take user back to 1st worksheet and close the 1 they were looking at and making it inactive.

Following code is what I use to open and close sheets:

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

The above works fine for opening and closing.

But if I use Excel's standard CTRL + F search facility and change options to search workbook, it doesn't work because every other sheet other than 1st sheet is inactive.

View 3 Replies View Related

How To Get A Macro To Search Another Workbook

Jul 19, 2014

I have a simple spread sheet that I made that takes the first letter of a name entered into cell (A1), combines it with the last name entered into cell (B1), and inputs that combined information into cell (E1).

It works how I need it to for the most part but... I need Excel to look at a completely separate workbook (containing four sheets), and search the entire workbook for exact matches of the combined information in (E1). If it finds a match elsewhere in that workbook I want it to add a 1 to the end of the combined name. I basically want it to increment the number until it does not find one that already exists in the other workbook.

Example: Cell (A1 contains Bob), Cell (B1 contains Smith). Currently Cell (E1 would display bsmith) - I need for Excel to search the other workbook, and if it finds a bsmith anywhere in that workbook add a 1 to the end making it (bsmith1). If it finds (bsmith1) increment it to (bsmith2) and keep going up by one number until it does not find any other matches. The other workbook is located on a mappedshared network drive.

View 4 Replies View Related

Compare And Search Data Between 2 Sheets?

Apr 25, 2014

designing a macro, which can compare the sheet1 and sheet2 data (exclude E and G columns) and find duplicates rows of data in sheet1 and sheet2. The output after the macro, would be show duplicates found in sheet1 and sheet2, through highlighting the rows.

attached file for the sample data:

output_data.xls

View 1 Replies View Related

Copy Data From Multiple Sheets In Workbook To Different Workbook But On One Worksheet

Feb 7, 2014

I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.

View 4 Replies View Related

Lookup (macro To Search All Of Column In Multiple Sheets For A Date That Has Been Put Into An Input Box)

Feb 17, 2009

i want a macro to search all of column A in multiple sheets for a date that has been put into an input box.

the matching dates have data corresponding to them in that row. i want the date and data from the row to then be copied into a new sheet.

View 4 Replies View Related

Create New Workbook With Separate Sheets From Data In Another Workbook

Jul 16, 2012

I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.

I.E.

ATL
ATL
ATL
ATL
CEN
CEN
JCK
JCK
etc.

There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV

The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.

So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.

I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.

View 5 Replies View Related

Search Sheets For Data Match, Paste Results

May 13, 2009

I have a worksheet named "List" with static values in columns A & B. I want to search all the other worksheets in the same workbook for the one that matches the value I entered in column B on the "List" sheet. The cell on the other worksheets with the possible match is B5. When it finds a match, I want it to take the data from cell B3 on that worksheet and paste it in Column C of the "List" sheet on the corresponding row (all rows in the "List" sheet have a different value in Column B).

In other words, when "List"b7 = worksheetb5 , then worksheetb3 is pasted to Listc7.

View 13 Replies View Related

Search Folder And Subfolders, Open Workbook Macro

Jun 5, 2009

i am trying to open a get a code working that will enable me to enter a file name in a cell of the current workbook open, then search through a root directory and subfolders, find the file and open it. the code below i giving me grief. i am using 2007 excel.

With Application.FindFile
.NewSearch
.LookIn = "J:IsolationDataBaseIsolationProcedures"
.SearchSubFolders = True
.Filename = Range("N2").Value
.MatchTextExactly = True

View 9 Replies View Related

Macro To Search Workbooks In A Folder For A Specified Column And Paste In Another Workbook

Apr 8, 2014

Would like a macro that will do the following:

- Go into a specified folder (ie. C:data) which contains multiple workbooks

- search each workbook for a column titled SCIN

- copy the cell labelled SCIN and 60 cells below it to a new workbook (summary workbook)

- repeat the process in all the workbooks until all of the SCIN columns have been located and copied into the summary workbook

View 14 Replies View Related

Run Macro For All Sheets In One Workbook?

Nov 14, 2013

Macro command to run a macro in all sheets of a workbook

View 6 Replies View Related

Set Macro To Run On All Sheets In Workbook

Feb 3, 2013

I have a macro (see below) that simply formats a sheet for printing. I am currently clicking individually on each sheet in the workbook, and running the macro. Is there a way to have it automatically loop through all the sheets in the workbook?

My current macro is:

Sub Set_Print()
'
' Set_Print Macro
'
Application.ScreenUpdating = False

[Code] .......

I have about 10sheets / workbook, and 80 workbooks to do, all saved in the same folder.

View 2 Replies View Related

Macro - 10 Workbooks Into 1 Workbook With 10 Sheets

Jan 24, 2014

I'd like to create a macro that will take 10 workbooks and add them to a new work book, but have each workbook as a separate sheet.

So every month from work I get a report file labeled as the current month (JAN_14). Then there about 19 folders in that folders labeled with product names; then in those folders are two excel files (they're all named MSTASCH_QUICKLOOK_1 and MSTASCH_QUICKLOOK). I figure if I can see the macro to combine 10 workbooks I can change it to do less or more workbooks. I had tried a macro that takes the workbooks from one file and puts them into two seperate sheets (although I would love to have the order changed of how they're put into the workbook).

VB:
Sub MergeSheets()
Dim wbDst As Workbook
Dim wbSrc As Workbook

[Code]....

View 4 Replies View Related

Using Macro For Multiple Sheets In Same Workbook?

Oct 18, 2013

I have a macro listed below that I would like to use on multiple sheets within the same workbook.

Sub PrintMacro1()
'
' PrintMacro1 Macro
' To change print format from landscape to protrait

[Code].....

View 4 Replies View Related

Macro To Hide Sheets In Workbook

Jun 3, 2014

I have a workbook that I edit daily then pass along to another team. All of my modules are passwork protected and there are also several sheets in the workbook that I hide before email it to the other team. I hide the sheets by changing the sheet properties in the VBA editor to "2 - xlSheetveryhidden".

This isn't a very time consuming process but I am wondering if there is a way to automate it through VBA?

I tried the the fail safe of "see what happens when I record it" but all I got was an empty Module.

View 2 Replies View Related

Macro To Delete Sheets In Another Workbook

Mar 2, 2009

my code to loop through sheets in another workbook does not want to work. in This Workbook (SourceWb), I copy the current workbook using SaveCopyAs and then reopen the new workbook. from ThisWorkbook (SourceWb), I am trying to delete any sheet between "First" and "Last" where a specific criteria is not met. so starting from the For Each to get my loop values, where PMs is a list of people's initials:

For Each c In Range("PMs")

If c.Value = "" Then GoTo AfterArrays

View 9 Replies View Related

Special Highlight Duplicate Data Macro

May 14, 2008

I am looking for a macro to highlight duplicate data in Col A.

I have googled etc, and found quite a few, but some were slowish, some didn't work, some did.

The best I have found so far is this 1. I believe this was posted by Richard Schollar

Sub ColorDupes()
Dim v As Variant, r As Range, i As Long, j As Long
Set r = Selection
v = r.Value
For i = 1 To UBound(v, 1)
For j = 1 To UBound(v, 2)
If Not IsEmpty(v(i, j)) Then
If Application.WorksheetFunction.CountIf(r, v(i, j)) > 1 Then r(i, j).Interior.ColorIndex = 3
End If
Next j
Next i
End Sub

This seems to run fine and be quite quick providing I highlight the column first.
What I'm looking for is a pop up window to also show me some data relating to the duplicates. I usually work with large lists and would like the macro to say how many duplicates it found from how many rows of data.

It is a very handy macro, and is very short on the coding side I notice compared to all the others I found (Which is Good?), I'm no coder

View 9 Replies View Related

Macro - Shortcut For Moving Between Sheets In A Workbook.

Jan 13, 2009

Could some one amend the VBA below to allow a continous loop on moving to the previous sheet within a workbook. Currently when I move to the first sheet if I use the shortcut key I get a debug error.

View 6 Replies View Related

Macro To Consolidate 20 Workbook Sheets Into One Sheet

May 12, 2011

I have 20 excel files each having more that 1000 records, the format and header for all the files are same.

I need to consolidate all these 20 different files into one excel sheet, having only one header row at the top. Since I need to perform this step frequently, I am planning to automate it.

View 9 Replies View Related







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