Search Only In Specific Columns (or Ignore Other Columns)?

Mar 25, 2014

Find button in Spreadsheet. My problem is I wish to only search 2 of the columns on my sheet.

I have been trying to locate info on my own, see here: [URL]

But I cannot seem to find anything showing how to specify where to search.

Here is the code I am using

[Code] ......

Want to search columns G and J -OR- Search entire sheet but ignore Columns A and B ...

View 2 Replies


ADVERTISEMENT

Search For A Word In Specific Columns

Dec 12, 2008

I am trying to create the ability to search for a word in specific columns. In my case below I want to search D5:E500 but it's not working. It searches the whole ppage.

Private Sub searchfind_Click()
Dim searches As String
searches = searchfirstname & searchlastname
If WorksheetFunction.CountIf(Range("D5:E500"), searches) = 0 Then
Exit Sub
End If
Cells.Find(What:=searches, After:=ActiveCell, SearchOrder:=xlByRows, SearchDirection:=xlDown, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub

View 9 Replies View Related

Search For Specific Compatible Data From Two Columns

Mar 22, 2012

adapting the bolded code to search for a specific row where the date displayed in "DAT2" (a date in Column A) occurs in the same row as specific data (e.g CEF1) in column B (note that there will only ever be one combination like this on the worksheet but it could occur in any Row) and then display just that result in "Experimental".

Private Sub CommandButton1_Click()
Unload Me
Dim CellFound As Range
Dim Rng As Range
Dim Wks As Worksheet
If TextBox1 = "" Then
MsgBox "You must enter a Date to Find."
Exit Sub
End If

[code]......

View 1 Replies View Related

Search Across Columns By Row & Replace Specific Cell Contents

May 2, 2008

I have created a desk planning spreadsheet in excel. Each week a mailmerge sends out an email to everyone in the office asking them to confirm when they will need a desk in the next week.

As the normal employee doesnt get involved in desk planning I want them simply to state whether they will be in the building or not by entering "GH" (our building) in a cell under each day in the email they get sent.

When the reply comes in we select the cells from the email and then paste them into the desk planning spreadsheet.
-----

WHAT I NEED TO DO:
Select some cells (must be in the same row - that we have just pasted in).
Press a button on the Worksheet labelled "Auto Assign Desk", which does this:-
For each cell that contains "GH", replace with the right-most cell to the left of the selection that starts "GH_"... (this is the start of a unique desk reference (GH_1_1, GH_1_2,etc.)
-----

This will assign the employee to the desk they were sat at last, when they are in the office next week.

View 7 Replies View Related

Search And Delete Combinations Of 4 Specific Numbers Stored In 5 Columns?

Aug 28, 2012

I attached partial file so you can see what i mean. I pasted only a few combinations cause the file was to big and i wasnt able to attach it...there are 142506 combinations . But you can see what i mean. A VBA or a macro on the worksheet will do the job?

View 9 Replies View Related

Search Columns Of Worksheets / If The Columns Contain Data Then Form A List On Another Worksheet

Apr 17, 2013

I have a workbook that has worksheeets for every day of the month. The data in the worksheet consists of columns (employee #, name, clock in/out times, and break penalty).

What I am trying to do is create another worksheet that searches all the other worksheets for a "yes" in the "break penalty" column and then create a list of all the employees that received a break penalty for the entire month. I would like this to be able to auto populate throughout the month as data is entered and not have to use a filter every time I want to compile this list.

View 3 Replies View Related

Conditional Formatting On Two Columns To Ignore Asterisk

Oct 28, 2011

I'd like to compare two columns of data and highlight where a value doesn't occurr in both columns. The problem I have is that one of the columns uses * around the text to ensure it catches all variations of the value.

I have the following formula which would work if the data was exactly the same.

=COUNTIF(lst2,value)=0

However, these *'s are meaning it never works.

Is there a way to make it so that if the values with the *'s are not found in the 1st column of data, conditional formatting is activated?

View 4 Replies View Related

Search Parts Of Columns Looking For Matches In Parts Of Other Columns In A Row

Mar 1, 2014

I have sheets with names of people in columns....some married...some not. When they are married, here's a sample format...

Jones, Donald T | Baker, Sarah Jane | Jones, Sarah Jane | Smith, Sarah J | Jones, Sarah Jane Smith

In this example, I would like to be able to determine which of the Sarah's belongs to Donald w/o having to visually look at each record ( 100,000's of records). (FYI: the names for Sarah would/could be her Maiden Name and possibly a name or two from a former marriage). What I need to be able to do is match and extract the names of Jones, Donald T and Jones, Sarah Jane and Jones, Sarah Jane Smith and eliminate Smith, Sarah J and Baker, Sarah Jane.

In my example, Donald is in the first column, but can be in any column on a row so the name positions are random across the columns. However, the format for each column is then same...Last Name, First Name Middle Name(or Initial) with a comma always after the last name in each column. The length of the last name also varies.

VBA or Formula that will search the cells in the columns of each row and return the names (complete contents of the cells with matching last names) that have a matching last name for that row.

View 3 Replies View Related

Search Two Columns?

Mar 22, 2012

I have a list of names in column C and a list of Codes in column A. I have a unique list of the names from C in column M and a unique list of codes as headers in N1 through S1. A name will be used several times in column C But will only match a code in column A one time. My codes are: In, Out, Shop, ConfRoom, Libr, Musm, and Thrtr. How can I search the name and code and get the time from column E and put it in the appropriate cell. I can concatenate everything and do a VLookup but that would be several thousand rows.

View 3 Replies View Related

Search Through Multiple Columns?

Jul 28, 2012

The first tab of the excel sheet called 'Data' displays information on the years that 2 countries traded with one another. For example, from the years 2005-2010, Belgium traded with multiple countries (Australia, Brazil, Canada, Chile). However, there could have been one year or multiple years where it did not trade with a particular country (e.g. in 2006, it may have skipped trade with Chile).

What I'd like to do is basically create a function that searches through the data and returns a 1 if Belgium traded with a particular country each year from 2005-2010 and a 0 if it did not. So, for instance, because Belgium traded with Australia, Brazil, and Canada in all 6 years, the function would return a 1. But, because it did not trade with Chile in all 6 years, it will get a 0.

The second tab called 'Results' displays what I'd like it to show. I've tried using if statements (but they don't work with text), vlookups, match, index .

View 2 Replies View Related

Search For Values Between Two Columns

Jul 13, 2014

I need a formula that matches a number on Sheet1 with a number on Sheet2. Sheet1 contains 7 columns of numbers. Each column corresponds with the same column on Sheet2 if the number on Sheet1 column 1 can be found in Sheet2 column 1 then the result is True. If the number is not found in Sheet2 column 1 then the result is False. This same criteria would apply to columns 2 through 7 as well.

The formula would start by selecting a number in Sheet1 that corresponds with the formula column and then scan the entirety of the matching column on Sheet2 for that number. If it is found in that column the result is TRUE.

Sheet1 H3 corresponds to Sheet1 A3 scans all of Sheet2 column B for the value in A3 if it's in Sheet2 column B the result in H3 is True if it's not then the result in H3 is False.

EXAMPLES:
Sheet1: column heading 1 - (A3) = 2223333333
Sheet2: column heading 1A - (B72) = 2223333333
Result H3 = TRUE

Sheet1: column heading 1 - (B3) = 222333333314
Sheet2: column heading 1A - (C67) = 222333333314
Result I3 = TRUE

Sheet1: column heading 1 - (C3) = 222333333332
Sheet2: column heading 1A - (D61) = 222333333332
Result J3 = TRUE

Sheet1: column heading 1 - (D3) = 222333333321
Sheet2: column heading 1A - (E62) = 222333333321
Result K3 = TRUE

Sheet1: column heading 1 - (E3) = 222333333331
Sheet2: column heading 1A - (F65) = 222333333331
Result L3 = TRUE

Sheet1: column heading 1 - (F3) = 222333333351
Sheet2: column heading 1A - (G70) = 222333333351
Result M3 = TRUE

Sheet1: column heading 1 - (G3) = 222333333352
Sheet2: column heading 1A - (H69) = 222333333352
Result N3 = TRUE

I've attached a workbook with examples : match_numbers.xlsx‎

View 3 Replies View Related

How To Search Number Of Columns

Mar 19, 2014

I need to search multiple columns to find a match before I want the result selected which itself will be in a different column.

It seems to me to be an extension of the VLookup function. Attached is an example of the sort of spread sheet I am trying to pull data from. I am trying to get the result of Area 5G, for site ZZ, KPI 2.1, Date Apr-13. As well as the result for Area 5G, Site (empty), KPI 2.1, Date May-13. I hope this is not to convoluted

View 14 Replies View Related

Search 2 Columns For Duplicates

Mar 9, 2009

I want to search Column A in sheet1 vs column B in sheet 2. If there is a match, i want copy Column B in sheet 1 and PASTE it to Column E in sheet2. I have a macro (helped by those on here ) that will find the duplicates and copy cells from the cooresponding row only to another sheet.

The tricky thing is, the macro I have makes a complete new sheet. I want to copy the data to column E on sheet2 ONLY if there is a match for that cell. If ther eis nto a match i dont want it to put anything.

View 3 Replies View Related

Search For Value Across Multiple Columns

Apr 5, 2014

I need to find the fruit name in the table, and then reference the color from the corresponding row's Column G value. I have experimented Match, Index, Sumproduct, with no luck. Do I need to somehow nest with a VLookup?

Range A1:F4 Fruit Color (Col G)
VeggieVeggieApple VeggieVeggieVeggie Red
ClementineVeggieVeggieVeggieVeggieVeggie Orange
VeggieVeggieVeggieVeggieBananaVeggie Yellow
VeggieVeggiePear VeggieVeggieVeggie Green

Name Color From Col G
Apple Use formula to pull "Red"
Clementine
Banana
Pear

View 4 Replies View Related

Search 2 Columns Of Information

Aug 2, 2007

I have the following code below, im not sure how to modify it to make it only search 2 columns of information, how can do this?

Private Sub CommandButton3_Click()
Dim StrFindWhat As Range
Dim NextCell As Range
Dim WhatToFind As Variant

WhatToFind = Application.InputBox("Please enter the Application or Service you want to search for?", "Search", , 500, 80, , , 2)
If WhatToFind "" And Not WhatToFind = False Then
For Each oSheet In ActiveWorkbook.Worksheets
oSheet.Activate
oSheet.[b4].Activate.....................

View 9 Replies View Related

2 Columns Of Numbers To Search

Jun 10, 2009

I have 2 columns of data (Column A and Column B).

I would like to be able to search the two columns and see if any of the data repeats in either column. Here's an example:

15844721565538
15907771565575
15936501574897
15946991576501
15970061576502
16095501578841
16124741578842
16124781578843
16124821578844
16166161578954
1616781 1616781

The list is much longer than this. I need a formula or whatever that would scan both lists and say, nothing matches, or 1616781 matches or highlight the matches or whatever, just so long as I don't have to go down the entire list multiple times.

I would have downloaded Htmlmaker and provided a glimpse that way, but the web site is blocked here at work.

View 9 Replies View Related

Search Multiple Columns

Nov 26, 2006

=INDEX('Cost Table'!$A$4:$C$305, MATCH(A1308,'Cost Table'!$C$4:$C$305,), MATCH("Item Description",'Cost Table'!$A$4:$C$4,))

I have the above formula to search a worksheet for an item description. It looks for a part number in one column. I need to now search two adjacent columns (maybe more down the road), can I adjust this to do that?

View 9 Replies View Related

Search If Value Exist On Another Tab In 3 Columns

Jun 14, 2007

I have this situation

On the first tab there is a list of IDs
45
676
234
451
788

On the second tab there are thousands of IDs in 3 columns (A,B,C)

What should be the best way to click on the button on the firs tab and see 'yes/no' whether ID exists in second tab in any column ?

View 9 Replies View Related

Use Find To Search Columns By Default??

Feb 10, 2009

It always hassles me to have to change the default setting of FIND to search by Columns instead of Rows.

My question is simple: Is it possible to change the default setting so that every time I use FIND it will search by Columns by default???

View 2 Replies View Related

Compare And Search Columns For Text?

Apr 14, 2009

I recently posted a similar thread which was very well supported but I couldn’t get a solution because my requirements were not clear enough. I would like to try again with a slightly easier and clearer requirement.

I would like a spreadsheet that compares and searches columns for text and returns true if a duplicate is found.

It is similar to a lottery checker except the lines being checked could be a string instead of a single character.

I have attached a spreadsheet which helps explain what I’m trying to achieve.

Basically, a user can sequentially enter a single character to cells F1:F5. These values are then compared to columns A:C. If one of the columns contain the values in column F then return true to G1.

View 2 Replies View Related

Search Columns And Paste Rows

Feb 26, 2009

I have an excel spreadsheet with:
2 sheets,Sheet1 and Sheet2
4 columns (A,B,C,D)
100,000s of rows.

I need to search 3 columns, B,C and D, for particular values.
Column B needs to be = 0
Columns C and D need to be "<=0.1"

When all three criteria in the row are matched I need the value from column A in that row to be pasted to Sheet2 and then for the macro to continue searching the rows.

I have attached an extract of the data as the files size is too large to upload.

View 10 Replies View Related

Search Data In Multiple Columns?

Oct 16, 2012

show me a formula using the criterias under Column E so that cell F2 will return the result as "202 IR" and cell F3 will return the result as "654 CC"? the data is saved over three different columns

A
B
C
D
E
F

Class1
Class2
Class 3

Staff #
Staff & Class

125 CC
758CC
1214 CC

202

123 IR
213 CC
2314 IR

654

456 IR
202 IR
654 CC

View 8 Replies View Related

Search Dynamic Columns With Criteria

May 12, 2014

Trying to create a dynamic vba code that searches the second last active column for a particular criteria. In this case it is the value "901".

If the criteria is met it will search the row to see if value is >=0 then change to zero where applicable.

In the example, I have a loop which searches Column 6 for the matching criteria. I want to change from Column 6 to "second last column" which is Dynamic to allow for more column to search through.

The two codes below search through column "A" and Column "B". Is there anyway to make this Dynamic also so it searches from Column "A" to the 4th Last Active Column.

So the Column to check for Matching Criteria is "Second Last Column" The Data to Loop through will be from Column A to the "Fourth Last Active Column".

Public Sub ChangeCellValue_TwoConditions_ColA()
Dim Last_Row As Long
Dim iLoop As Long
Last_Row = ActiveSheet.Range("A65536").End(xlUp).Row + 1
For iLoop = Last_Row To 1 Step -1
If (trim(ActiveSheet.Cells(iLoop, 1).Value) >= 0) And (trim(ActiveSheet.Cells(iLoop, 6).Value) = "901") Then
ActiveSheet.Cells(iLoop, 1).Value = "0"

[code].....

View 3 Replies View Related

Search And Delete Entire Columns

Sep 27, 2007

I have Column Headers in Row 1 (except column A), What I need to do is write a Macro or some code to

1.Search the entire row 1 for column headers containing the suffix _CSV and delete the entire columns.
2.Shift all remaining columns to the left so no blank columns exist. (There is a time stamp in row A that I wish to keep where it is.)


Next I would like a separate routine to sort the columns in the order of a Pre-defined list that I specify in a range. For example the list of column headers reside in the Range (A1:A200)

View 9 Replies View Related

Massive Search In Different Sheets/columns

Sep 24, 2008

I'm trying to make vba, that takes one value(special code, up to 13 car long) from sheet4 column i1 and searches the match from sheet2 columns E:M. And when match is found, copies from sheet4 column K1 value(the same row where the code was taken from) to found match sheet(in this case sheet2) in column Q (the row must be the same where match was found)
If this maters, columns E:M may be hidden on sheet2, or E1 may be only one that's shown.

And has to loop until the end of the sheets.
By the way - i've got up to 150000 rows..

View 9 Replies View Related

Vlookup Search Of Multiple Columns

Feb 23, 2007

I have an XLS sheet filled with every zip code in the US... the zips are in multiple columns adjacent to columns with the corresponding county names.

Unfortunately, the there are up to EIGHTEEN columns of zip codes in each row describing the counties... not one zip per row. I'm assuming this was done to save space.

In another sheet, I have list of client zip codes and need to VLOOKUP the corresponding county from the first sheet. I'm certain I'm not using VLOOKUP right...I'm getting #N/A every time.

Is this because it's only checking the first column of zip codes? I need it to check all 18 columns of course... there are no repeated zips.

How do I do this without rebuilding the full zip database page?

View 3 Replies View Related

Lookup/Search Multiple Columns/Criteria

Apr 9, 2008

I am looking to write a search function that searches through a whole document. The only examples I can find are of a could different search functions but they all are searching an specified individual column and even then I didn't really understand them. My worksheet has 6 different columns which are all different labels for a certain tool. I want the user to be able to input any of those 6 labels and have all the information in that row be returned.

View 4 Replies View Related

Add Columns With Specific Text In A Row?

Mar 21, 2013

I am trying to track street pavement for a city and as you can imagine, there is a lot of data entry.

At the end of the day, I will need to know the total length of streets with brick, asphalt, and concrete. Column 'D' has the street material (Asphalt, Brick, Concrete) and Column 'E' will have the length. At the bottom of the sheet, under column 'E', I have cells that will show the total length for streets with Asphalt (E61), Brick (E63), and Concrete(E65), so I need a formula to enter in those cells that will look for the specific pavement materials it is totalling

Also, I am tracking streets with/without curb and gutter. If a street doesn't have it, I need to track how much will be needed. Basically, it will be the length (Column E) times 2 (both sides of the street). In column 'G' there will either be 'Yes' or 'No'. If 'Yes', then I don't need a total and the cell containg the amount of curb and gutter need (Column 'J') will be blank. However, if 'No', Column 'J' will have the total amount of curb and gutter needed ('E??' x 2)

Obviously the sheets will be different lengths so the cells will need to be copied and pasted.

View 4 Replies View Related

How To Protect Specific Columns Via VBA

May 8, 2014

I have a workbook that has protected cells however need the ability to specify which columns to allow editing and which not to allow. For example all data in column A can be edited however column B can't. Column C & D can and E can't and so forth.

View 4 Replies View Related

Sum Specific Columns And Rows?

May 25, 2014

I have built a capacity planner which is broken down in days.

In row 1 i have tagged the column with a week number indicator i.e. 5 columns (=5 days) are tagged "Week 1", next 5 tagged "week 2", etc.

I am trying to create a weekly view of this and need to sum the values of all cells on row 7 for a particular week i.e. I want to sum Cells R7, S7, T7, U7, V7 which represent the 5 working days in "week 1"

View 8 Replies View Related







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