Regular Expressions, Extract DIGITS
Sep 27, 2006
I need to extract DIGITS from following: C23, C24, C515-C519. It may be done with regular expressions. Does anybody have experience with VBA code for RegEx?
Input: C23, C24, C515, C519.
Output: 23,24, 515, 519
View 5 Replies
ADVERTISEMENT
Dec 11, 2009
Documents......Data.xls
where "..." is any old string of characters?
View 9 Replies
View Related
Jul 7, 2014
I'm trying to do a COUNTIF using regular expressions. I can do it in SQL, but I'm having a hard time figuring it out in Excel.
My SQL query looks like:
[Code] ....
In Excel, I'd like to do the same thing so that I can send it to a client and have the counts already in the spreadsheet. Basically, I want count anything that has 5 numerical digits followed by "_.....".
View 3 Replies
View Related
Sep 24, 2009
Hope the title isn't too broad. Every time I think I have got to grips with RegExp I get stuck on something apparently quite simple. So, I have a few queries so I hope OK to bundle them together.
1. How do I remove the word 'of' only if it occurs after certain other words (the other words should also go). E.g.
"Vale of White Horse" should stay the same
"Borough of Lambeth" should become "Lambeth" (because 'of' after 'Borough')
I tried "Borough(sof*)" but that doesn't remove either word.
2. How do I remove everything after a '/' (inclusive)?
I have tried "/sw+" which removes the first word after '/' but there could be other words
3. How do I remove everything inside brackets (inclusive)?
View 6 Replies
View Related
Apr 13, 2007
I am using the following to check if a string has a sequence of 6 decimal digits in it. But am getting an error. If(str Like *######*). I have to check if str has values like 123456USA ; ABC725439 ; jh658478hd. I thought # represents a single digit and * represents any no of characters
View 2 Replies
View Related
Oct 18, 2006
I want to extract the fifth and sixth digits from an 8 figure number i.e. 20010891 would equal 10.
I have tried every combination of Left & Right combined with Find that I know and nothing works.
View 4 Replies
View Related
Nov 13, 2006
I have a string in a cell that contains a name, a 3-4 character alpanumeric code and then a 4-6 digit number, each separated by a space. An example or two:
J Bloggs SPEC 123456
J Smith AG06 9364
J & K Brown SWP 358686
I need to be able to have in a new cell the 4-6 digit number at the right of the cell. give a formula that will separate the data I need? I've tried numerous ways without success.
View 4 Replies
View Related
May 27, 2008
I would like to extract numbers based on the first 2 digits (22....) of a column along with its next column (on the right) and put them on another sheet.
View 9 Replies
View Related
Apr 28, 2014
I have a long string that has a list of digits in the middle that I want to extract. The string is variable length and the number of digits I want to extract is 5-7. I also have slashes in between the numbers I want to extract. I need a UDF that allows me to extract the 5-7 digit number from the string and restrict around the slashes (i.e. if two sets of digits in the string match the condition for extraction, extract the one around the slashes.) For example my original data is like
1. aaa/12345/aaa/123
2. aaaaa/123456/aaaaaa/3423
3. 323/aa/1234567/aa
and I want for results
1. 12345
2. 123456
3. 1234567
Is there a UDF that allows me to do this?
View 14 Replies
View Related
Oct 17, 2011
I have in my cell a number, namely, 5260007005020024100055040300004110000000
What I would like to do is extract a set of digits from it,
Starting from the second 2, and shown here in the dots. I need all of the numbers in a separate cell, "52600070050200 .24100055.. 040300004110000000"
Hope this is clear. bearing in mind the number will remain as one so I would need to start at 14 then using LEN or something I'm not sure, extract the following 8 into another cell.
View 5 Replies
View Related
Mar 29, 2014
I basically I have a column with numbers. All the numbers are positive integers. What I like to do is have a VBA function that extracts the integers with the largest number of digits. So for example if we have the following column:
12
123
234
12346
2345
[code].....
So basically we search for largest number of digits, and extract the numbers that fit this category, which could be just one number or multiple numbers.
View 5 Replies
View Related
Oct 31, 2008
i need to format my numbers in the following format
10,00,000.00
the first three digits will be separated and then subsequently 2 digits
View 2 Replies
View Related
Apr 30, 2014
I have the following working great, but would like to see it refine a little, as the data vlookup is 6 digits, but i only needs the last 4 digits is enough for me to work, my question is how do i go about adding that to the following function i have implemented and working fine.
=IF(ISERROR(VLOOKUP(B4,' cmfs01home$peter[tracker data 4-25-14-a.xlsx]ControlSheet'!$B$2:$F$301,4,FALSE)),"",VLOOKUP(B4,' cmfs01home$peter[tracker data 4-25-14-a.xlsx]ControlSheet'!$B$2:$F$301,4,FALSE)
View 12 Replies
View Related
Feb 27, 2013
I am trying to design a generator in excel that generates algebraic expressions.
For example
In cell B4 the formula is RANDBETWEEN(1,12)
In cells C4:29 I have letters a - z listed in a column one letter per cell.
In a separate cell from which excel reads is the formula:
=B4&CHOOSE((RANDBETWEEN(1,26)),$C$4,$C$5,$C$7,$C$6,$C$8,$C$9,$C$10,$C$11,$C$12,$C$13,$C$14,
$C$15,$C$16,$C$17,$C$18,$C$19,$C$20,$C$21,$C$22,$C$23,$C$24,$C$25,$C$26,$C$27,$C$28,$C$29)
For example one possible result would be 3f.
However if the result was 1m, in a separate cell I want excel to realise that B4=1 and then display it as m.
I've attached the spreadsheet as well : algebra.xlsx‎
View 1 Replies
View Related
Jun 21, 2009
When I open a spreadsheet I get the following message
Excel found unreadable content in Book_Name. Do you want to recover the contents of this workbook.
All the information I find says:
This issue occurs if the following conditions are true:
The workbook contains a PivotTable that uses key performance indicators (KPIs).
The KPIs are created in the Analysis Services Business Intelligence Development Studio.
One or more of the KPIs have an expression in the Current Time Member property.
and the fix is : To resolve this issue, remove the expressions from all Current Time Member properties.
My issue is - the spreadsheet with Pivot tables is supplied to me. I am using Excel 2007 - how to remove the expressions?
When I do this on another machine same version of excel I have no issue.
View 3 Replies
View Related
Sep 25, 2009
I am editing a wine database which contains a vast amount of data, one column has the wine name and sometimes the vintage year in the begining or at the end of the cell. Sometimes the year is made of 2 digits (03, 05, ..) or 4 digits (1978, 2004, 2005, ...).
Is there a way to remove this vintage year form the string?
to make matters worse, there is often a single quote/apostrophe in front of the vintage year, which is driving me mad as 98% of the time it is one of these hidden ones that cannot be deleted using the find/replace function.
examples are like below:
De Wetshof Finesse/Lesca Cahrdonnay ‘07
De Wetshof Sauvignon Blanc ‘07
Lord Neethling Cabernet Franc 2002
Lord Neethling Pinotage ‘01
Bouchard Finlayson Tete de Cuvee Pinot Noir ‘07
Jacobsdal Pinotage 1994
Zondernaam Sauvignon Blanc 2007
Tokara Red
1976 St Emilion
03 Tokara rose
Plasir de Merle Cabernet Sauvignon ‘05
DuToitskloof Pinotage/Merlot/Ruby Cabernet
1999 Tradition Juracon 375ml
I have been searching the Internet for the past 2 days without luck on how to delete the end of string vintage year.
I have had some luck with the left side, as in:
=IF(ISERROR(VALUE(LEFT(B2,SEARCH(" ",B2)-1))),B2,MID(B2,SEARCH(" ",B2)+1,LEN(B2)))
As I am not an expert with Excel, I have no idea on how to use VBA (every time I have tried even basic things, I failed) nor even sure how the above funtion works (found it on another site).
I thought I could acheive my goal in two steps, first removing the left side vintage and use this partial result with the RIGHT equivalent funtion, but it simply is not working!
View 14 Replies
View Related
Sep 25, 2009
I am editing a wine database which contains a vast amount of data, one column has the wine name and sometimes the vintage year in the begining or at the end of the cell.
Sometimes the year is made of 2 digits (03, 05, ..) or 4 digits (1978, 2004, 2005, ...).
Is there a way to remove this vintage year form the string?
to make matters worse, there is often a single quote/apostrophe in front of the vintage year, which is driving me mad as 98% of the time it is one of these hidden ones that cannot be deleted using the find/replace function.
examples are like below:
De Wetshof Finesse/Lesca Cahrdonnay ‘07
De Wetshof Sauvignon Blanc ‘07
Lord Neethling Cabernet Franc 2002
Lord Neethling Pinotage ‘01
Bouchard Finlayson Tete de Cuvee Pinot Noir ‘07
Jacobsdal Pinotage 1994
Zondernaam Sauvignon Blanc 2007
2003 Tokara Red
1976 St Emilion
03 Tokara rose
Plasir de Merle Cabernet Sauvignon ‘05
I have been searching the Internet for the past 2 days without luck on how to delete the end of string vintage year.
I have had some luck with the left side, as in:
=IF(ISERROR(VALUE(LEFT(B2,SEARCH(" ",B2)-1))),B2,MID(B2,SEARCH(" ",B2)+1,LEN(B2)))
As I am not an expert with Excel, I have no idea on how to use VBA (every time I have tried even basic things, I failed) nor even sure how the above funtion works (found it on another site).
I thought I could acheive my goal in two steps, first removing the left side vintage and use this partial result with the RIGHT equivalent funtion, but it simply is not working!
Does anyone have an idea on how to help with this?
Ideally I would love to cut the vintage year, whether 2 or 4 digit, whether on right or left of cell and paste it in another cell, so to avoid manually doing it.
However, this is surely too complicated to do, so iwould settle with just deleting the vintage year and manually typing the vintage in another cell.
View 9 Replies
View Related
Mar 15, 2014
I want to apply regular expression for password
a) The first letter cannot be number
b) the password should have a combo of numbers letters and one special character
c) The password should begin with a big case letter
View 1 Replies
View Related
Apr 10, 2013
I have built a custom .xlam file that I"m using as an excel add-in.
I'd like to write some VBA code which takes ranges from any random worksheet (into an array), and get a range from the xlam (into array).
I can't seem to figure out what combination of This.Worksheet and Active.Worksheet I should use.
View 1 Replies
View Related
Jul 31, 2009
I'm trying to figure out the whole Regular Expression thing...so I figured Hotpepper's EXDATA UDF would be a good place to try and rewrite with Regular Expression...I got it to work...but not sure why as it seems opposite of what I would have expected...
eg pattern [^/d] i thought would give me everything except numerics...but it appears to be giving me numerics....
here's the code and sheet...can someone help explain what's going on? .......
View 9 Replies
View Related
Jul 23, 2009
I am creating an electronic timesheet. I have created drop downs for times of the day, which then automatically calculates the number of hours worked based on the times selected. The trouble I am having is, I also need to incorporate "Vacation", "Sick Day", etc into the drop down box where the time of day is located.
The sheet works great until someone selects a non-time related answer, such as "Vacation". When this option is selected, the cell that is supposed to contain the number of hours worked says #VALUE! when I, in fact, need it to list a value of 0 for the number of hours worked. Any idea on how to combine my formula =(D6-D5)*24+(D8-D7)*24+(D10-D9)*24 with an IF statement that will automatically assign a value of 0 if a text answer is selected from the drop down?
View 6 Replies
View Related
Jun 10, 2014
I want the first 60 rows of column C to be constant meaning C1, C2, C3, C4..C59 and after 60 rows it should start again with C1, C2, C3.....C59 rather than C60, C61, C62. In other words i+1 but after 60 rows i should be reset to 1 and then again increase by 1. how can i implement these changes
[Code] ......
View 2 Replies
View Related
Oct 13, 2008
spreadsheet has daily hours worked per employee and a weekly total. What is the formula to take the weekly total per employee and separate the regular hours (first 40) and have the overtime show up in the next column (without getting negative numbers for the totals under 40).
View 4 Replies
View Related
Feb 5, 2013
I want to track a friendly competition of squash games with a friend.
player1
player2
January
[Code].....
I have a simple column chart showing the progress of each month but I'd like a 13th pair of bars showing the percentage, with the percentage scale on the secondary axis. Do I have to choose the percentage cells as a separate series?
View 8 Replies
View Related
Aug 13, 2013
Basically the two instances shown are the same, one is a pivot table, the other is copy pasted values off the pivot.
I need to prepare a chart for this data such that the years are show on X axis and the "frequency intervals" and the Count are shown on Y axis ( Im assuming one would have to be one on primary and one on secondary).
What this data is conveying is that e.g. in year 2002 there were 16 customers who bought between 0-799 quantity of a given item, in 2003, 48 customers bought a quantity between 0-799 and so on and so forth.
See attached the image [URL] .......
View 3 Replies
View Related
Feb 18, 2014
I have a cell in which I would like to have a user enter an email address. If it does not follow a valid format I would like it to display an error message, "Invalid E-mail Address", clear contents and re-select the cell otherwise move to the next cell. By Valid email I want it to check for only one "@", and at least one "." but I also want it so that a user can't just bypass it with typing "@.". I would like it to reject special characters and spaces and only allow "-" and "_" maybe a general format of <name>@<place>.<domain>
The cell in question is K45 and the following cell would be K47 if a valid email is entered
View 8 Replies
View Related
Feb 14, 2009
Un-Skipping the Rank after a duplicate value to get a regular Series!
Col A------Col B------Col C------Col D
Players------Scores------Rank------Answr
SACHIN------186------1------1
DHONI------183------2------2
KAPIL------175------3------3
HAYDEN------175------3------3
SEHWAG------167------5------4
BORDER------158------6------5
RAHUL------152------7------6
LARA------148------8------7
RICKY------148------8------7
KEVIN------142------10------8
BOON------133------11------9
FLINTFF------119------12------10
BOTHAM------112------13------11
I want to prevent the skipping of numbers while using the RANK function which skips the next number when it hits a duplicate value. I want to get the rank as well as not have the next number skipped.
View 4 Replies
View Related
Apr 21, 2007
Does VBA code created in an Excel file that is saved as a Template (.xlt) work the same when the file is opened as an .xls file?
View 9 Replies
View Related
May 20, 2009
i have a list of part numbers that all have prefixes and i need to sort them into regular part number order and can't seem to figure out why i'm having such a hard time. the order i need them is this example. i need after part number 1-1 to be 1-2 followed by 1-3 etc. not 1-10 followed by 1-100. i hope i'm explaining this correctly.
View 9 Replies
View Related
Jun 8, 2013
I have a worksheet with 35,136 rows of data. I want to calculate the average of every 4th cell in the same column. Is there a way to create a macro to select every 4th cell in the average formula? If so, can I then substitute min and max for average?
View 1 Replies
View Related