Match All Text And Closest Number In Alphanumeric String?
Feb 21, 2014Formula to match all text and closest number in alphanumeric string
View 1 RepliesFormula to match all text and closest number in alphanumeric string
View 1 RepliesWondering if it is possible to generate a random 4 digit number based off an alphanumeric string?
Example;
Cell A1 has 123XVF1234
Cell A2 has 321AFW4321
In B1 I would like to have a 4-6 digit number that is generated based on the alphanumeric data in Cell A1 (and so on down the list). If that is possible, I would also need to be able to convert back the 4-6 digit number back to its original alphanumeric value
Example;
If B1 returns 643562 it would need to be able to be converted back to 123XVF1234
I needed to know how to find the closest match to a reference number
regardless of whether its larger or smaller. I did a search and found a post
back in March that said to use the following:
=SUMPRODUCT(((ABS(list-target))=MIN(ABS(list-target)))*list)
I applied it to my application and it works, I just have no idea why. Can
anyone explain this formula to me or tell me where I can find a good
resource.
I would like to parse a part number.
ab24s-12-g4a
if there is a "-#-" in the string, that is the value I want. If the "-#-" is not present, I would like to take the first number. Currently, as written in your first example, I am getting the first number - excellent and thank you!
In the sku, the first digit reprepresents capacity. If a second number is present after the capacity portion of the sku (i.e. "-#-"), that means that they want to order it filled with less than capacity. For instance, a carton of eggs and they want 6 eggs instead of the max capacity of 12. (i.e. egg12-6-z2z). Numbers after the second octet (i.e. z2z) do not matter.
It would be a number only in the second octet. If there are characters with it, the equation should disregard it.
Here are the scenarios, and what the formula should accomplish
1) egg12 --> currently returns 12
2) egg12-6 --> would return 6
3) egg12-6-g2c --> would return 6
4) egg12-g2c --> would return 12
Have many rows of alphanumeric strings. 2-4 letters followed by a variety of numbers, some spaces, and some additional letters. What I need is to return the first number after the initial 2-4 letters, everything after that first digit is junk. Thus, I would like a formula that takes me from:
AB23400 12 -> 2
CET25800 1 -> 2
NYT67300 H01 -> 6
HSRF49900 1 -> 4
What is the formula to be used to extract number from a alphanumeric string located at different row?
example:
test123test128test131
test124test129test132
test125test130test133
test126test131test134
test127test132test135
test128test133test136
result: ....
I have the following text string.
What formula can I use to extract these results on the right?
Sample file.xlsx
I need to extract just the text from cells which contain both letters and numbers. There can be one or two letters, followed by one, two or three numbers. (For info, these are chemical elements and their masses). So for instance,a cell could contain anything from the following B9, B11, S32, Ca44, Mo100, I129, Th226, U238 etc etc. I know I've seen this done before, but I can't find it now. It also has to be formula based, not using VBA.
View 4 Replies View RelatedI have another question regarding extracting Alphabet from the alpha Numeric String:
Column A
POT470G12B
PBY100G12
PCLN6400S12
PCX.US10X12
AAPL6000G12A
BP380S12A
BP390S12
The output i want from the string is :
Column A
Column B
POT470G12B
G
PBY100G12
G
[Code] ........
I have data on two spread sheets which I am trying to cross reference. On the 1st spread sheet I have a list of product codes e.g. 22886, On the 2nd Spread sheet I have a list of product titles which all include product codes within the text e.g. CHRISTMAS FANCY DRESS COSTUME - SANTA SPARKLE OUTFIT 22886 M
I need to insert a formula into the 1st spread sheet which will tell me if based on the product code it is present in the 2nd spread sheet. I have tried VLOOKUP and I think because I am trying to search for a code within a text string it keeps failing! All cells are general cells but the position of the code within the titles varies.
We use excel to organize salaries and contracts for my fantasy baseball league. I need an easy way to go through all the teams and subtract one year from each players contract. This is an example of a team.
The contracts are in the columns like this NG-3
I would like to change that to NG-2
Is it possible to increment / decrement cells using wild characters? I've found myself needing to increment values at different position, for e.g. :
ABC-###-FR05-AB
ABC-222-FR##-AB
C##445-KJ
where I would want to be incrementing # placeholders. It would help if I can give it a start number, and the increment amount (which can be different than 1).
What about possibly extending it a bit more to include two or more place holders at the same time as follows:
ABC##- FR*** (where # would have its own starting number and increment value, and * would have its own).
i wanna convert the decimal number to a round number...like 2.0L to 2L.
View 6 Replies View RelatedI want to be able to return a text string of either Trainee 1 or Trainee 2, (or default to other text) based on codes that are 4 digits (DD01, KKB1, KKB2, KKC2, GG03, etc, where starting with K and ending with 1 or 2 is the criteria for TR 1 or TR 2 . There are two many KK** items to list them all in an If statement and I can't seem to use a wildcard.
=IF (right(c1,1) = "1", "Trainee 1", B1)
gets me halfway there I think but of course doesn`t pick up Trainee 2 and also returns Trainee 1 when it sees DD01.
I am having an issue with formatting a cell to 'general'. I have a macro that runs using a formula (i.e. =MID(A12, 18,5)) to extract certain characters from an external data source. I then use only the values of that formula. There then is another macro that compares that value to another value in another worksheet. The issue I am having is when the macro runs, the code is read as ActiveCell.Offset(0, 3).Value...but instead of returning the value in 'general' format, it returns it with what appears to be text (i.e. "75.50" instead of 75.5). This acts as a mismatch since the quotes appear.
I have attempted several things to correct, but even if I try to format-->general it maintains the quotes. The only way it changes is if I click within the cell...then it turns to general (i.e."75.00" becomes 75.5). I am not sure what is the issue.
I couldn't resolve the formula of Index-Match for getting the values that matches the following criteria
1) Match the "Category" of Table 1 to Table 2
2) Match the "value" of Table 1 to Table 2, if value is not present in Table 2 take the upper closest value.
Once the above conditions are met, Take the Result from Table 2
Table 1 is for Input and Table 2 is for Database.
Please note that Data in Table 2 should not be sorted in any way. I tried to use the -1 option of the Match function for upper closest value but it didn't work out.
Have a look at the file attached : IndexMatchUpperClosestValue_AlongwithExactMatch.xlsx
refer to the attached workbook for reference. I am looking for a function in Sheet1, Column E that will search for the value of Sheet1, Column A within Sheet2, Column A. When a match is found, the function should look across Sheet2, Columns B - V for values of 1. When such values are found, the function should return the associated value from Sheet2, Row 2. There may be multiple values of 1, and as such, the function should separate values with a comma.
View 3 Replies View RelatedI have about 10000 datas in column A which are items' description.
Now I have an Item description in B2 & I want the closest match in C2 with B2 from Column A.
I am looking for a fourmla to return a value in a column next to the closest value. Yes, this would normally be a vlookup example however in my application the numbers will not match exact as such in an client lookup application. I need to find the closest value to the value compared in the range and return the value to the right of it.
I have made up a small table attached with comparing what vlookup gives me and what I am looking for.
Example.xls
In the attached sheet, I am using !Staff times columns N and O to nominate a mid point break time relevant to the start,lunch break and finish times of a shift.
What I would like to do is match the result to the closest time from !Race Times Column D (highlighted green). So if for example the mid point of the shift is 10:37 (as in !Staff Times cell N23), it actually comes back with the !Race Times result of 10:35 which is the closest actual race.
Ideally I would like it to look both sides of the midpoint time until it came to the closest match, rather than always looking at an earlier time, or always a later time (eg the cell N79 has a value of 11:36, however the 2 race times are 11:35 and 11:40. Preference is it shows 11:35). If however the N79 result was 11:38 or 11:39, I would prefer it went to 11:40).
However if this is not possible then picking the next time in either direction will do.
I've got a vlookup function driven by the result of a simple equation.
=IF(C36="","---",VLOOKUP(C18/C39,'Engine & Configuration'!D1:G24,2,TRUE))
The issue I have is that I want the result to return the CLOSEST match, not an exact or rounded up match. For example, is my "C18/C39" equation returns a value of 1.000039, I want it to match with "1" in the array and not with 1.25. The FALSE option will not work because exact matches will be very rare.
The values in the array are not whole numbers, so I don't believe a ROUNDUP type code will help.
I am looking for a fourmla to return a value in a column next to the closest value. Yes, this would normally be a vlookup example however in my application the numbers will not match exact as such in an client lookup application. I need to find the closest value to the value compared in the range and return the value to the right of it. I have made up a small table attached with comparing what vlookup gives me and what I am looking for.
View 6 Replies View Relatedhow to checking data in 2 column each row, if partial/altogether string is match, shown "ok" otherwise show "check" with data in column a as parameter..
View 3 Replies View RelatedI'm working on a formula to make it enable a part of the text then return the best possible match. Below is my formula
=MATCH("*"&$A11&"*",'[Customer Master List - 05.30.xlsx]Export Worksheet'!$B$82:$B$1298,0)
However, it works with some text but won't work for some.
For example, I have this text CARE-A-LOT, INC and in the master sheet there is a similar text like this CARE-A-LOT. I want it to return CARE-A-LOT as this the best match possible.
In the four rows of text below I'm trying to match each gas stick to its corresponding gasline.
I think I can count over to "GAS STICK" and get the number. <15> From that point I can count over to "," (comma) and get that number. <26> So the gas stick will be between the first number and one less than the second number. <GAS STICK 1>
I need completing this code to place a the line or stick number in a cell B of the same row. Column A would have the description and column B of the same row would either be "1" or "11" respectively. Column C would be the shortened description (GAS STICK 1).
1] "HUNGA, DUNGA, GAS STICK 1, THINGY"
2] "DOHICKY, GAS STICK 11, THINGUS"
3] "SCAPPEN, DAPPER, GASLINE 1"
4] "SUCH, AND, SUCH, GASLINE 11"
[Code] .....
Attached File : ExactMatch1.xlsx
I have a spreadsheet with Approx 900 rows of information that has been entered incorrectly.
Spreadsheet has 6 columns.
Contact Name
Contact Number
Company Name
Company Account Number
Order Date
Order Numbers
Every Order should have its own line - However I have approx 900 rows where the order numbers have multiple entries instead of single entries.
All the order numbers end "LO" and there all 8 digits long.
I wanted to know if its possible to use excel to look for all instances of "LO" in the column Order Numbers and delete the original Row and replace it with 3 rows with the same information.
Example:
Attached to this post!
I have 15 historic files each approx 35000 rows and I suspect there are more errors
I'm using vlookup to get a price for a unit of measure and it passes the value of the lesser not the greater. Is there anyway to get vlookup to pick the closest match as the greater value not the lesser one?
For example:
1000 units costs $8,000
4000 units cost $23,000
12000 units cost $68,000
If someone wants to buy 2500 units, I'd like the vlookup to pass the price based on 4000 units, but it passes 8,000 the value on 1000 units.
Can I use vlookup to give me the result of the greater unit not the lesser?
I am trying to find a closest match for a given value comparing to values in a chart. I got it to work..but it will only return a closest value that less than it. I need it to also look "up", and return a value higher than it if it is closer. I have attached the worksheet. The vlookup part is for choosing which row to use, based on the value in B1. The column index portion of the vlookup is where the trouble lies....I am comparing the value found it B2 to chose the column...and that column should be the closest value...but like I said before, it will only return a lower value. The formula is in cell B11 (Correction Factor). it SHOULD return 1.26....instead, its giving me 1.18. (200 is closer to 192 than 175 is)
temp press exp.xlsx
I'm comparing one string array with another using VLOOKUP. About half
the list matches exactly if I use FALSE in the Range_Lookup. On the
items that don't match I used TRUE in the Range_Lookup but found it
doesn't get the closest match. See example:
Test Table Array
AAABBBCCC
AAACCCCCC
AAACCCDDD
Lookup Value = AAACCCCC
VLOOKUP returns 1st item in Table (AAABBBCCC) ????????????
Of course item 2 (AAACCCCCC) is the better match but VLOOKUP doesn't
see it that way.
Does anyone know of a way around this problem? Maybe a character by
character match function that returns the item that matchs the most
number of correct characters?
Is there a way to set up drop downs so that you can type in the drop down box and it searches for the closest match?
View 1 Replies View Related