2 Values To Search On Same Cell?
Apr 1, 2014Can the below be shorten up? It's basically to count if "dr" or "ba" appear in cell E2180;
=IF(ISNUMBER(SEARCH("(dr)",E2180)),"1",IF(ISNUMBER(SEARCH("(ba)",E2180)),"1",""))
Can the below be shorten up? It's basically to count if "dr" or "ba" appear in cell E2180;
=IF(ISNUMBER(SEARCH("(dr)",E2180)),"1",IF(ISNUMBER(SEARCH("(ba)",E2180)),"1",""))
The below code is what I have and it works but what I need is for it to loop until it doesn't delete anything. How can this be done?
View 2 Replies View RelatedI am trying to add up all values from the cell above the search criteria. Although sumifs does work well, it wont search the entire sheet, it only works in specified rows.
Also, the problem is that the values to be added are determined via a vlookup based off of a cell whose value is chosen by a drop down choice.
Code:
Sub DeleteCells()
Dim ws As Worksheet
Dim cell As Range, search_cell As Range
Dim i As Long
[Code]...
A few issues with the above code: I have manually checked that there is a sheet with a value in M12 that is found in the H column range, but it doesn't change the value to zero. (this was confirmed with an =IF(M12 = H101,1,0) returning a 1 value.
Secondly, it takes a long time to process not a lot of data. (about 2 minutes to get through 3 sheets of 180 actual rows of data, (rest blank). Is there any way I can speed it up? I will eventually be cranking it up to 30 sheets of data and up to 360 rows. (The 500 was thrown in earlier to make sure it covered everything).
finally, it also lines every cell value in I(end of data):I501with a zero, when there are blanks in other cells, can i get it to not put a zero in,
it's a search loop which runs the following when the file is opened. I would put it in the workbook_open sub but instead I want to have the sheet update before a main userform appears.
What I need it to do is:
Read each cell in column K from row 6 onwards to the last active row.
If a value is found then store the value (let's say as variable x) and from that cell, add up each value starting in the cell that is two columns to the left (column I) and one row down, onwards going down until a cell = "" is reached in that column (contains nothing). The total values added in column I could be stored as variable y.
Once cell = "" is reached, have x - y to make z and then the total (z)should display in the cell to the very left of the very original cell that contained the value x.
Finally, if x = the value in the cell to the immediate left from where x is (so same row but in column J), have that whole row from column A to L turn green, else have it turn orange:
I have two worksheets with products that I need to compare.
Each product has a code and a product name in the following format:
Column A has the product code and column D the product name,for
example:
ColumnA:
AM1BL15X
ColumnD:
AGLO MEL BLANCO 1C 15MM 215X244
Both sheets *should* have the same data in them but there are 4000
products that need to have their description verified.So I need to go
down each row on Sheet1 , extract the product code from
Sheet1.ColumnA and the product name from Sheet1.ColumnD. Then do a
search on Sheet2 for the product code (Sheet2.ColumnA) and verify that
the product description on sheet2 (Sheet2.ColumnD) is the same as in
Sheet1.ColumnD. If it matches,everything is OK. If not there is
something wrong. So I´m thinking that maybe the product codes that
dont have matching descriptions could be entered in to a separate
worksheet so that someone can check it later.
I´ve been reading around and found these code samples from this site
[url]:
Dim rng1 as Range, i as Long
Dim cell as Range
With worksheet("Sheet1")
set rng1 = .Range(.Cells(1,1),.Cells(1,1).End(xldown))
End With
i = 0
for each cell in rng1
if cell.Value worksheets("Sheet2") .Range("A1").Offset(i,0).Value
Then
' do what - they don't match
else
' do what - they match
End if
i = i + 1
Next
I´ve been trying to make some changes but I dont quite know how to get this working to do what I want and I only get errors.
I have two worksheets with products that I need to compare. Each product has a code and a product name in the following format: Column A has the product code and column D the product name,for
example:
ColumnA :
AM1BL15X
ColumnD:
AGLO MEL BLANCO 1C 15MM 215X244
Both sheets *should* have the same data in them but there are 4000 products that need to have their description verified.So I need to go down each row on Sheet1 , extract the product code from Sheet1.ColumnA and the product name from Sheet1.ColumnD. Then do a search on Sheet2 for the product code (Sheet2.ColumnA) and verify that the product description on sheet2 (Sheet2.ColumnD) is the same as in Sheet1.ColumnD. If it matches,everything is OK. If not there is something wrong. So I´m thinking that maybe the product codes that dont have matching descriptions could be entered in to a separate worksheet so that someone can check it later.
I´ve been reading around and found these code samples from this site ...
I have three parameters that users on my spreadsheet will be using. They will be searching using the 'Brand', 'MPAN' and 'Tariff' fields.I would like to have drop down menu's for then to select the correct search option. I then have another sheet within the same workbook with all the data in it with columns headed of Brand', 'MPAN' and 'Tariff'. It has to be an excat match using those three parameters though. I would like the parameters the user selects on the first sheet to be searched and found on the second sheet, with the figures in the cells next to the search result getting fed back into a set cells back on the first page.
View 9 Replies View RelatedI need a formula to extract data after "<li>Color: " & before"</li>"
A
B
1
ORIGINAL
RESULTS
2
blah blah blah<li>Color: White</li>some informations
White
3
blah blah blah<li>Color: Red</li>some informations
Red
4
blah blah blah<li>Color: Black</li>some informations
Black
5
blah blah blah<li>Color: Red</li>some informations
Red
I have already use this formula but I get the "#VALUE!" error even if the cell contains the "<li>Color: </li>" data.
[Code] ....
Sometimes, some cells does not contain the "<li>Color: </li>" data, I don't want the "#VALUE!" error, I just want a blank cell there.
This is an example with the real values I want to extract Example.xlsx
This is the formula that works
[Code] ......
From mySQL database, i am getting a ton of data that is all being inputted into a single excel cell. Within this cell, there are certain data points that i wish to obtain (Bank #, SSN #, Routing #). There are multiple difficulties in obtaining this information.
1. these cells contain the same fields, but different number of total characters (differing in names, addresses, etc.)
2. some of the data points (like SSN) are inputted incorrectly, so even though a SSN is only 9 digits/characters, I may have to output all 11 that the SQL database placed within the cell.
Can I get some help? I'm thinking of a search function/macro within excel, because all of the fields show up correctly.
something like (i know this doesn't work)
= or("cellA1" contains/finds/function SSN,return the 9 characters after "SSN ")
um...yeah. difficult to explain, i'm sorry!
edit: not sure what is wrong the file. I have attached a new one.
I need one formula to copy and paste the checkcard data changing it from this "CHECKCARD XXXXXX5623" to "CHECKCARD 5623", but I need one formula to look for multiple known checkcard numbers. I will have more then one typically in the bank download so I need to search and copy at least two known numbers as shown below.
I am providing the formula that I am using right now, "=IF(ISNUMBER(SEARCH("5623",B3)),RIGHT(B3,41),"")" but it only works for one checkcard number? Also I don't really need to capture the DEBIT or CREDIT that will always be at the end, it would be redundant. If it's easier to write the formula including that data that is no problem. What I want to copy and move into an adjacent cell is in red.
Here is the source data:
Row 2 - SONIC DRIVE IN#1531 AUSTIN TXDEBIT FOR CHECKCARD XXXXXX5623 DEBIT
Row 3 - JASON'S DELI # 125 Q64 AUSTIN TXDEBIT FOR CHECKCARD XXXXXX9718 DEBIT
I am trying to search for multiple values in a cell with Multiple criteria.
E.g: Please find attached the sample excel data.
I tried using VLOOKUP which is not working as I am having multiple values in column A.
Given the following data located in Sheet1 of a Workbook -
•I have seven columns (assume header row names are “A, B, C, D, E, F, G”) each containing numeric data in random order.
•All columns are of the same length (equal number of rows), followed by a blank cell, but the number of rows is unknown.
•Columns with header row names A-E will only contain numbers from 0 to 100, while F and G may contain numbers from -127 to +128.
Here is what I would like to do –
I would like to be able to analyze the data in columns A-D to locate rows that contain specific combinations of values (ex. row 41 contains the values 50, 0, 0, 0 and row 239 contains values 100, 0, 0, 0 in columns A – D, respectively, etc.).
For each row that is found to contain one of these combinations (there are many different combinations required), I would like to copy the associated values from columns E, F, & G for that row, and paste them into their respective (E, F, & G) columns located on Sheet2 of the same workbook. However, I would like to paste the E, F, & G values into a specific row order on Sheet2, DETERMINED by the value of the A – D combination identified on Sheet1.
Continuing with the ex. above, let’s say I would like to have the EFG values from row 239 in Sheet1 copied to row 10 in Sheet2, while the EFG values from row 41, Sheet1, are to be copied to row 11 in Sheet2.
In effect, I would like to create a table of this subset of data, in a specific order, from which I could work later.
I can do this manually using “ AutoFilter” to locate the data I need and then write formulas to copy the data from Sheet1 to Sheet2 in the order that I need, but every time the order of the original data on Sheet1 changes I have to start all over.
I tried both IF and LOOKUP and failed. I'm trying to search for values from one worksheet and identify whether or not those values exist in another worksheet. I attempted the following lookup in field A2:
=LOOKUP(B2,Sheet3!A$2:A$914,Sheet3!C$2:C$914)
B2 (thru B5000 or so) contains values I want to search for; sheet3!A$2:A914 is where I want to look and column C of that same sheet, entered the text "Yes" in an attempt to have the results list "Yes" for hits and N/A for misses. (All fields are text.) I copied the formula all the way down the sheet in column A. The result it is returning is N/A in A2 and Yes in A2 -to the bottom, which is incorrect.
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‎
Is it possible to search for multiple values (and present the result in a certain cell) within a range that spreads over two columns? For example: between A10 to A15 and B1 to B10.
View 6 Replies View RelatedI am working on a spread sheet that searches for an employee's clock number, pulls the data from a particular week and displays it all on one page. I have 6 different tables of different stats, 4 weeks each and I would like to pull all of this data together. I have successfully created a page that when you plug in an employee's number, all of thier stats apear from all 6 data sets for the last 4 weeks. I do this by using ....
View 9 Replies View RelatedProbably this is a simple question but I am still in a learning curve:
I have a table as the example below, I need a formula for colum C where the all results for a given depth are display one after the other.
DEPTHRESULTRESULTS AT 3m0346713569256553673447857968057647536925012000134244355467569670572445334223115
Is it possible to use the match or an other excel function to search for the first occurence of one of two values in a range?
For example in the below range i want to find the location (number like the match function) of the first occurence of "No" or "Closed":
Project Name Tasks DocumentTask ReviewTask ApprovalIssue DocumentIssue ReviewIssue ApprovalMilestone DocumentMilestone ReviewMilestone ApprovalPro 1closedYesyesyesyesclosedYesyesno
There are two sets of values.
The first one are located at Sheet1(a2.a6) and Second one are at Sheet2(A1.A1000). how I can write a VBA code to find the First value in Second set of values. If it found in second set, Sheet1.B1 will be entered as the found value from Second set of value otherwise "NOt found".
This task should go till the no of values in first set (in this example five times)
I would like to search and copy values from one Worksheet to another.
In my case, The project number and account are listed in one worksheet called 'Source'.
In the Target sheet, The Account Column should be filled according to the Project number as per the data in source sheet.
Sample sheet : Sample.xls
Lets say these are the values in sheet 1, ROW 1:
B1: David
C1: 44673
D1:Mike
E1:88473
F1: Mika
G1 77463
H1:
I1:
J1:
And these are the Lets say these are the values in sheet 2 ROW 155:
B1: 77463
C1: 44673
D1:Mike
E1:
F1:
G1:
H1:88473
I1: David
J1 44673
As you can see, there are the same 9 values in both rows in both sheets ( (no value is important as well).
However, they are not located in the same row number (1 and 155) and the order in which they are written is different.
What I would like to do is to search all the rows in sheet 2,(columns B-J only) and if there is a match for all values in a specific row to a row in sheet 1 (again, order is not important), than the Value in column A from the specific row in sheet 1 will be copied to Column A in sheet 2 for that maching row.
ok I have multiple columns where Col-A can have any number between 1 and 5. Col-B has a 3 digit number in it. i want to search all of column A and determine if there is a 1 in it, if so i want it to print the value of col b into a specified area.
here is an example of my form.
COLA | COLB |
--------------
1 | 324 |
--------------
2 | 325 |
--------------
1 | 327 |
---------------
this is basics, i will be using this to search col-a, determine what number is in the column, then print the number found in col b, on another page in a specific place, on the other page i have squares labeled 1-50. in a grid pattern, 10 squares per row. im trying to get all the entries in col-a, that are a 1, to put whatever value is in col-b in the first box of the grid, whatever is found in col-a with a 2, the value found n col-b of that row, into the grid box labeled 2 etc......
I am familiar with the custom formatting option to hide cell contents when you don't want them displayed in either a chart or when printing: Custom > Type > ;;
I was trying to create a macro that will search a specified range and whenever there is either a zero or nothing displayed in the cell (even though a formula exists), I want to custom format the cells to not be displayed.
My range is Range("B5:I16")
I tried to create something like
Code:
Dim dataRange as Range
Set dataRange = Range("B5:I16")
For each Cell in DataRange
if Cell ="" then Selection.NumberFormat = ";;"
I'm struggling to figure out how to tell Excel to step through each cell in this range, evalaute whether there is a blank and if so, apply the NumberFormat ";;" to it, otherwise let it be.
I am trying to find a way to search for specific cell formulas (not the values they produce). For example, how could I search an Excel tab for a cell containing "= sum()" ? I want to ignore all other formulas and values. I then want to replace this formula only with its value.
View 4 Replies View Relatedi've written the code below but somehow the output is not what i want.
i have a multiple records and each records contain 30 rows of info i have 3000 over records and they are all in one sheet. i need to find record using more than 1 criteria. I've written the code below. how to use VBA to search for particular strings in cells?
for e.g.
A1 : hello
A2 : world
A3 : anyhow
i want to find the cell that contains "yh" using VBA, and the output should be in cells A3.....
I have a workbook with a sheet for every month. I have a searchbox searching for a client and jumping to that location. The problem I am having is that it takes me to the last occurence in the workbook if there is more that one client with the search criteria. Do you have any suggestions for a searchbox that whould take me to the first occurence and give me an option to go to the next occurence in the workbook. Please see the code below that I am using currently using.
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Dim cl As Range, rng As Range
For Each ws In ActiveWorkbook.Worksheets
Set rng = ws.UsedRange
With rng
Set cl = .Find(Me.TextBox1.Value, LookIn:=xlValues)
If Not cl Is Nothing Then
Application.Goto cl
Else
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
I want to use vlookup up function to search for a specific data set. when it finds it i want it to look 2 columns over and add the value then continue to search for the specific data set again in the range provided in the vlookup, when it finds another matching the criteria look 2 columns over and add that cell value to the previous count.
keep a running total until it has looked through the whole sheet. here is an example of the vlookup i am using, it is not suming because thats where im stuck. also a quick data set to picture what i am talking about. In the data set in plain terms i want to look for the line name and add the qty on that line into a chart.
=IF(ISNA(VLOOKUP(A8, 'Web Queries'!G$3:H$40, 2, FALSE)) = TRUE, 0, VLOOKUP(A8, 'Web Queries'!G$3:H$40, 2, FALSE))
LineOrder_NumQTY
7L58545487320
7L5856060351
Z_56784817515
Z_56784824115
Z_57454577222
Z_57454562424
Z_57454547524......................
I have a spreadsheet containing several names. I want a formula or macro that will search a string of text within the cell. If the text exists within the cell, I need a code to populate. For example,
In cell E2, search for a phrase anywhere in the cell that contains "COM". In cell H2 look for the exact phrase "ASB". When "COM" is found in E2 and "ASB" is found in H2, in cell U2 return the value "COM ASBTVL".
In my case, E2 may not contain "COM", it may contain "DEN" instead. In that case, if E2 contains "COM", and if "H2" contains "SVC", then in U2 populate "COM APPSVC"
I'm guessing in my code I will need to list a set of criteria that will search row by row and return certain values when finding the text I specify.
Would a macro be best for this? Does anyone know how I would put that together?