I play an online browser game and I've made a spreadsheet for tracking various aspects of the game.
I do okay with the simple formulas and can haphazardly get excel to do what I want it to do. But for a few things I want it to do, I've run into a wall...
Here is the first one:
In the game, I receive reports like this:
One of your fleets (Large Cargo:5 ) returns from [2:100:9] to Planet [2:101:13] . The fleet is delivering 58.679 Metal, 28.750 Crystal and 11.521 Deuterium.
I want to be able to copy that, and past it into A1. Easy enough, but here's the tricky part. I want excel to be able to automatically extract the numbers in front of metal, crystal, and deuterium into their own separate fieilds. So that in this instance B1 would display 58,670, C1 would display 28,750, and D1 would display 11,521.
The amounts can vary anywhere from 1 to 9,999,999 (but there will be no negative numbers), and in some cases the number would end in 0 (I've seen where that makes a difference in some formulas for some reason).
If it makes it easier, the copy/paste could be reduced to:
The fleet is delivering 58.679 Metal, 28.750 Crystal and 11.521 Deuterium.
I have a huge collection of data where i need to extract out the lines that contain "hsbc" or "hbio"
E.g. 1) N0253 HBIO Corporate 2) N0082 HSBC Bank USA National Association
Basically, this data is in range C1:C500 and i need to place it into buckets so i.e. if the word contains HSBC then find out how many days it took to service, where "days to service" is in column AG
I have tried to set one formula which will given the the Numbers of the Vehicle. However as there are other numbers also which makes it difficult to do so.
Is there a way either by VBA or manually (preferably both, if possible) to actually unite the X amount of numbers that are in a cell given the contents is alphanumeric? I'll give you the following examples to see if you can understand what I' referring to?
DATA output should be asd67,h876 --------> 67876 2,3,ujdj5&34 -------> 23534 909k86m34 --------> 9098634
I import data from another program in order to evaluate it. Unfortunately, one of the fields I need contains copyright data, however, it has been very inconsistently entered into the database. For example, sometimes the data appears "c1999." or "-1999" or "" or "[1999]" or even "19?" and also sometimes "1999, 1990" and many other variations on that. I discovered the link in the excel help file about extracting numbers from alphanumeric strings, but my situation is still too variable for it to apply; that file didn't take into account that alphanumeric strings don't always lump numbers and letters together. I was able to correct a few things, but my command of excel isn't knowledgeable enough to really come up with something effective.
Some ideas I had that I don't know how to implement: is there a way to strip non-numerical characters from an alphanumeric string? (I've been doing some find/replaces to get rid of some of it, but that is obviously not very efficient when I have to repeat this process daily.) Perhaps then I could just detect the first 4 numbers of the string somehow. However, that doesn't solve the problem of when a wild card is used as in "199?" or "20?" etc.
Bottom line, I just need to grab the first four numbers that appear in the string (but NOT additional numbers that occur after a wild card or a space if the year was not completed in 4 numbers; in that case I'd just be happy with a null value).
I've been doing this with a formula so far. My only experience with macros has been in simply recording them, not actually writing them, but I'll give anything a try.
if cell a1 is "3cash 5stock", i want to extract the number "3" to cell a2 and extract the number "5" to cell a3. the number in cash stock can vary between 1 to 8 and vice versa.
I need to separate text information from a cell into 3 columns (W,9-8). The first letter I know how to extract. The problem is to extract the number in the middle (1 or 2 digit) between "," and "-" and also the last number. For the last number I could use right() function but the problem is that number could be 1 or 2 digits so I can not specify in advance so formula would have to extract the last number till "-". Anyone knows how to do this?
and return "400" but i've encountered a value which is negative (could be -$400, or ($400); and i got an error of #value, could anyone resolve this problem?
I would like to extract the digits below in red. The variables are the digits in all of the sections vary from a minimum of one digit to the maximum of three digits.
I have not managed to find exactly what I am looking for so far..
I have cells with a mix of numbers and strings and I would like to extract certain numbers only.
I.E. 123a bcd8 acbd 1234e
I would like to only extract the first instance of numbers - so in example 1 - 123 and in example 2 - 1234. I have found various methods of extracting all numbers such as:
Function ExtractNums(r As String) As String 'Creates and returns a reference for a regular expression object With CreateObject("vbscript.regexp") 'Sets the pattern to be non-digits .Pattern = "D" 'We want to find all matching non-digits .Global = True 'Replace all non-digits with an empty string and return this value for the function ExtractNums = .Replace(r, "") End With End Function
I need help extracting numbers from text. In column A, I have a list containing entries like this:
0005 Nurseries — propagation and cultivation of nursery stock 0016 Orchards — citrus and deciduous fruits 0034(1) Poultry Raising 0034(2) Sheep Raising and Hog Farms 0035 Florists — cultivating or gardening
The list goes on for about 800 rows.
In column J, I have this forumula:
{=LEFT(A1,MATCH(2,1/ISNUMBER(MID(A1,ROW(A2:A100)-ROW(A1),1)*1)))} It works great, except the result includes the left parenthesis: for example, J3 = "0034(1". Is there a way to obtain just the numeric value ("00341")?
Also, is there another formula I can use in column K that will do the opposite and extract only the text? For example: K1 = "Nurseries — propagation and cultivation of nursery stock" and K3 = "Poultry Raising".
I came up with a way to extract entire row corresponding to the highest number in L column and to post it in the different sheet.
I have 2 issues to solve though.
1. I need to extract only 13 ranges corresponding to the highest number in L column - ( A through M) - not entire row.
2. I need to do the same with the second and the third highest numbers of the same column L.
This is what I have so far:
Sub extract() Dim first As Range Set first = Range("L" & WorksheetFunction.Match(WorksheetFunction.Max(Columns("L")), Columns("L"), 0)) first.EntireRow.Select Selection.Copy Sheets("Result").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False End Sub
I am using Excel to collate the averages for my cricket team. All the players are listed in column A, followed by their scores for each individual game throughout the year and ending with a total runs column for the season.
My problem arises when I have to give an indication that a player scored runs but was "not out", which impacts on the overall averages because a player who is not out is credited with the runs scored but not charged with an innings. So a player who made 15 not out is credited with "15no" in my workbook.
As a simple example: Player's name (Barry Smith) appears in A1, then his five scores: 23, 15no, 35, 125no, 2 in cells A2:A6. SUM($A2:$A6) entered in A7 ignores the cells that also include text (the "nos") and gives me a total of 60. Is there a formula I can enter in A7 to disregard the "nos" and just read the digits in those cells to come up with the grand total of 200? The run totals can be 1, 2 or 3 digits and I can split the "no" from the number (i.e. "15 no" instead of "15no") if this makes things easier.
I have a woorkbook where I have a cell that has the following apperance:
12345678-ABCDEFG
The numbers can vary in length and as well as the text. What I am trying to do is to split this cell into to columns. Column 1 shows the account number, Column 2 should show the Text and the "-" sign should not be in any of the columns ie it should look something like this
Column1 Column2 12345678 ABCDEFG
I have found a useful function for the first part thanx to Mikerickson URL:Extract Numerical Data
Function midNumber(inputStr As String) As Double Dim i As Long For i = 1 To Len(inputStr) midNumber = CDbl(Val(Mid(inputStr, i))) If midNumber <> 0 Then Exit Function Next i End Function
But how do i seperate the text and how do Crete a macro that would loop through some 2000 rows and create a column A and B from Column A?
We are changing management systems here and in order to do so we need to provide the names and addresses of over 400 different people. Our current management system stores people's addresses as a whole for example; 32, Example Street, Town, County, Postcode.
I cant extract just the numbers because I only need the house number and not the postcode.
After searching several forums I thought I had solved it with this.
Cell A1 is the extracted address from current management system reading 32, Example Street, Town, County, IU13 8TY
Cell B1 is =LEFT(A1, SEARCH(" ",O15,1))
Cell C1 is =SUM(MID(0&B1,LARGE(ISNUMBER(--MID(B1,ROW(INDIRECT("1:"&LEN(B1))),1))*ROW(INDIRECT("1:"&LEN(B1))),ROW(INDIRECT("1:"&LEN(B1))))+1,1)*10^ROW(INDIRECT("1:"&LEN(B1)))/10)
That only gives me the number "3" though and I need 32.
Basically A1:A400 will be addresses as above and in cell B1:B400 I need just there house number at the start.
As enclosed in my workbook,I want to separate the numbers between two strings of which one is in the left hand side and other is in mid.The data is in Column D.The simple way to understand is that,
Total Amount = Amount X Exchange Rate
Total Amount is in Column B, where as "Amount X Exchange Rate" is in combined form in column D.Yes, this I want to separate i.e Amount separately column and Exchange Rate in separate column.I have shown one expected result in column E,F.There are certain characters like ],= which you have to not to take any amount after ] or =.The currency is somewhere,$/$$/INR/IRS,etc.
my new payoff worksheet and then this small bug appears and my excitement like "poof"(gone)!.
with this code --> =if(search("ins",i27,),LOOKUP(99^99,--("0"&MID(I27,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},I27&"0123456789")),ROW($1:$10000))))+0
i can get the value if the word contains "ins" like this --> "Ins 723.00" return 723.00 which is correct, and then i've encountered a word which is like"723.00 Ins", and martin gave me the code to get from both sides which is this one --> =IF(ISNUMBER(SEARCH("Ins",A1)),LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))+0,"") . Work perfectly. and my big problem is that the word Ins 723.00 means Insurance and the 723.00 means Inspection, so it means they're different. and it means I cant use martin's code with this.
So is there any way i can get only the value if the word Ins is in the right side of the amount and also the code if the value is in the left side of the amount. I need two formula for this.
Column C is the tricky one. It comes from the bank and somewhere in there is a 4-digit tenant reference. I did a formula to try and isloate it and it worked on most but if you look at the very first row, there is a spurious 99 in there, so it didn't work. Is there a way of EXTRACTING the first four consecutive numbers and placing them in another cell?
I need to extract the number (regardless of the amount of characters) signified by the "." Another words, I need a formula that will give the the answers of the following in column "B"
1540.12 37.95 86.37
These are the amounts spent. It would be easier if there was a "$" but theres not... so I need to find the "." and give me the numbers associated with it.
I have the following data in column b and I would like to extract into individual cells.
I would like to extract upto the first number, number text after first number etc
I have several rows and the data lengths are variable
Liverpool FC 2 Sheffield United 1 Manchester United 0 Everton FC 3 Middlesbrough 2 Manchester City 0 Norwich City 2 Chelsea FC 1 Oldham Athletic 1 Crystal Palace 1 Queens Park Rangers 3 Southampton 1