Extracting Numeric Data To Array
Jul 31, 2006
I have a somewhat challanging task and have looked in all my vba books for a solution but am coming up blank. I am have a text file with just numbers in it and i need to extract each number and input it into an array so i can manipulate them from there. I have tried "for each" and " loop" statements but cannot get it to work.
View 6 Replies
ADVERTISEMENT
Oct 22, 2009
I am trying to do is extract the volume size of products in 'ml'
from 10k plus products from a description field cell.
this description field could also contain the weight of the product in grams
so I cannot just do a search for a numeric string ,
it has to be associated with the milli-litres statement .
is is possible to do a sort of ' *ml ' search and then select and copy to another cell ???
View 9 Replies
View Related
Oct 17, 2009
I've encountered is the spreadsheet attached. Basically I am trying to create a "complex" array (at least it's complex for me lol) to basically extract some values from tables and put them in one together. The array I thought would work is on the table with BRIGHT YELLOW BACKGROUND, whereas the table that could do the same work but more "manually" is with a RED border around it. I know I can do it manually as the red border table shows, but I've been trying all day to make it work with a complex array.
View 4 Replies
View Related
Apr 7, 2008
I have an array of variants..
lvarArrSource = Array(12, "=F", 2, 3, 4, 5, 11, 6, 7, 8, 9, 10, "123", "F", "F", "F", "F", 11, "F", "NR", "F")
which i am using to map columns between spreadsheets. The basic numeric entries refer to columns to copy. But I want to make the routine smarter with the strings.
If array(x) = 12 (For example) Then
Do something
End If
If left(array(x),1) = "=" Then
Do something Else
End If
If array(x) Is String literal (e.g "xyz" Or "123") Then
Do a third thing
End If
i cant find a typeof or isstring kind of function. Isnumeric works ok for some values but quoted numbers (eg "123") return true (which isnt what i want). I have tried the left(string,1) = """ but excel seems to hide the quotes.
View 4 Replies
View Related
Jan 2, 2013
I have sheet full of data containing results of multiple tests on various equipment.The sheet contains many columns of data but below are the specifc criteria i want to use to extract the data. As maintenance is carried out regularly the list is always growing. I want to create a dashboard summary of the "Machines" which i will colour using condition formatting. I will list the machines in the columns and would like the rows below each machine to be populated with the results.
Column 1 Lists the various factories
Column 2 Lists the Machine
Column 3 Lists the Part
Column 4 Lists the result.
Results can either be "ok", "warning", "Alert" only
View 6 Replies
View Related
Jan 5, 2005
My colleague has a problem where he needs to Extract numbers from alphanumberic strings. Here is the formula he is using:
=MID(B7,MATCH(TRUE,ISNUMBER(1*MID(B7,ROW($1:$297),1)),0),COUNT(1*MID(B7,ROW($1:$297),1)))
It works if alphabetic and numbers are clustered together such as scs987
It works if alphabetic and numbers are not clustered together such as scs987dtg
Problem: It does not work when numbers are not clustered together such as scs987dtg1234
View 8 Replies
View Related
Jul 31, 2009
I'm trying to extract alphanumeric data before and after a numeric string. The numeric string is in the middle of a URL, which is a varying distance from the start and end.
Here's a sample of my data:
URL Page ID Headline Section quiz.impression-http://www.stuff.co.nz/2677193 2677193
http://www.stuff.co.nz/travel/267779...flying-JetStar 2677794 Why-I-hated-flying-JetStar travel http://www.stuff.co.nz/technology/di...eo-a-smash-hit 1675213 Wedding-dance-video-a-smash-hit technology/digital-living http://www.stuff.co.nz/national/crim...ce-in-Auckland 2678248 Man-shot-by-police-in-Auckland national/crime http://www.stuff.co.nz/sport/rugby/s...it-for-Blackie 3674350 NZRU-set-to-bend-it-for-Blackie sport/rugby/super-14
I start with just column A and generate the other three from that.
I'm using some excellent code from a Mr Excel guru (thanks again Peter) to extract the 8-digit numeric string in column B, I just need C (after) and D (before).
That macro is:
Dim Bits
Dim c As Range
Dim i As Long
For Each c In Range("A4", Range("A" & Rows.Count).End(xlUp))....................
View 9 Replies
View Related
Mar 20, 2014
I have a directory folder with an active workbook and another workbook id like to copy data from. The Following macro opens up a file in the same directory, copies some data and pastes it in the active workbook. However with this code I have to specify the filename, 'Data.xlsm' in the example code. I would like it to copy data from the only other workbook in the current directory WITHOUT having to specify the name in the code, so just opening it up no matter what filename it has.
In addition I would like to extract the filename from the workbook im copying data from and paste it into the activewoorkbook in sheet 1 Cell A1. I had a look at getopenfilename function but cant seem to make it work for my purpose.
View 4 Replies
View Related
Oct 2, 2008
The following code will return everything in the array. What I would like for it do is:
Case 0 - I want to return first two ie, "A" and "B"
Case 1 - I want to return "C" through "F"
Case 2 - I want to return everything else that are not in MyA
Dim MyA As Variant
Dim i As Long
MyA = Array("A", "B","C","D","E","F","G")
For i = 0 To UBound(MyA)
Select Case ListBox1.ListIndex
Case 0: Rng.AutoFilter field:=5, Criteria1:=MyA(i)
Set Rng2 = ws.AutoFilter.Range
Rng2.Offset(1).Copy Sheets("Summary").Cells(Rows.Count, 1).End(xlUp)(2)
ws.AutoFilterMode = False
End Select
Next i
View 9 Replies
View Related
Jul 18, 2012
I have organized account numbers from two systems onto a spreadsheet, with numbers from System 1 arrayed in Column A and numbers from System 2 arrayed in Column B. I need to evaluate the numbers in both columns and isolate the numbers that are NOT DUPLICATES across the two systems (Columns A and B) and return a list of non-duplicate numbers in Column C. Here is what the table would look like:
System 1
System 2
Non-Duplicates
173
215
173
[Code] .......
What is the best approach to use?
View 4 Replies
View Related
Jan 8, 2014
I have a question about using conditional formatting in excel (2010); I made a table with the following columns:
"Supplier Name" "Supplier Lead Time" "Internal Lead Time" "Total Lead Time". I made two different scenarios to show different supplier lead times and different internal lead times, and used the minimum function in the "Total Lead Time" column to find the smallest total lead time to select the best supplier.
The last thing I would want to do with this set of data, is plug in a formula that would somehow indicate which supplier corresponds to the shortest total lead time (which supplier has the smallest supplier lead time). I'd like to be able to use a formula that enters the name of the supplier in a designated cell, which I could indicate as the "Preferred Supplier" cell. If this is not possible perhaps there is a way to highlight the supplier's name with conditional formatting?
View 2 Replies
View Related
Jun 4, 2014
I have a column of several thousand entries listed as numeric with a scientific symbol eg.
1.4mSv
19.53mSv/1mSv (some have a mix and or alpha/numeric range)
I want to convert them to the numeric value only. I'm extracting to a chart which is not recognising the alpha and throwing the data out. I tried find and replace, trying various options within the 'replace format' tab with no joy.
View 6 Replies
View Related
Sep 1, 2008
I have a few thousand products codes (i.e ABCD123BLA08 or SHU267BLA) They are non standardised in length or structure. I wish to pull out everything upto the end of the third numeric digit.( ie ABCD123 and SHU267) I cannot use left as they are all different lengths. Ideally i would serach for a non numeric char after the number then use left up to that point. Search can't do this, FIND can't do this.
Summary
ABCD123BLA08 would be ABCD123
SHU246BLU would be SHU246
I147ORT08-12 would be I147
View 9 Replies
View Related
Oct 2, 2007
I have some code that goes through some data that is imported from a database via a query.
This has been working for a few years without a problem.
I lookup and employee number on my sheet to the employee number in the database table.
this is my code that checks the employee number.
Set rs = Worksheets("Employee")
If rs. Cells(r, 2) = cells(1,1) Then 'if employee number matches
......
The problem is that now the database application has adapted an alpha option (it used to be numeric only). In order for my code to work I have to change the employee number on my sheet by putting a ' in front of it.
Example if the number was 127 I need to enter '127 in the cells.
I have a few thousand in my data.
Can I add some code to my macro so I can still enter just the number in the cells?
View 4 Replies
View Related
May 20, 2008
10/05/0808:30:00 AMValid Card EntryLamDoor 1
10/05/0808:31:00 AMDoor Leave Open Door 1
10/05/0808:32:00 AMDoor Closed Door 1
10/05/0808:41:00 AMValid Card Exit Yap Door 1
10/05/0808:46:00 AMValid Card Exit Lam Door 2
10/05/0809:14:00 AMValid Card EntryLam Door 2
10/05/0810:18:00 AMValid Card Exit Lam Door 2
10/05/0810:19:00 AMValid Card Entry Yap Door 1
10/05/0810:40:00 AMValid Card Exit Yap Door 1
10/05/0810:42:00 AMValid Card EntryLamDoor 2
11/05/0808:30:00 AMValid Card EntryLamDoor 2
11/05/0808:20:00 AMValid Card EntryYapDoor 1
11/05/0810:20:00 AMValid Card Exit Lam Door 1
11/05/0811:40:00 AMValid Card Exit Yap Door 1
the above is the data i need to work with (dates are in dd/mm/yy). i need to find a way (a macro, preferably) to extract the date and time corresponding to one person, and paste it into a new sheet, e.g. at sheet 2 (renamed to "lam") should be
10/05/0808:30:00 AM 11/05/0808:30:00 AM
10/05/0808:46:00 AM 11/05/0810:20:00 AM
10/05/0809:14:00 AM
10/05/0810:18:00 AM
10/05/0810:42:00 AM
View 10 Replies
View Related
Jan 23, 2013
I have a spreadsheet full of data and I need to extract only those lines of data which can be identified by the last three letters in a cell. I am adding an example spreadsheet which highlights the rows I am trying to extract based on the contents in column B but only where column B ends in KY.
Example data extract requirement.xlsx
View 5 Replies
View Related
Jan 12, 2010
I have a column that has cells with values as
19352510
C084111X AA
24253081
A001290U AA
19599291
48413321
I want to write an If Statement is a column next to each entry that denotes two options either Broker or Agent. Where the code is say 19352510 then Broker and where it is say C084111X AA then Agent.
Broker codes will never contain a letter. The Agent code will always start and finish with a letter.
View 9 Replies
View Related
Jan 25, 2010
I have a data import from our client something like this:
a1:12/11/2009 shoe bags blank-** $700.00 $0.00 $3,949.00
How can i delete all the numeric data in the cell?
i need only the text: shoe bags blank-** in a2
View 3 Replies
View Related
Jan 13, 2014
I am trying to create a macro that will essentially "pivot" some non-numerical data I have. One column contains data with leading zeros. I need to retain these leading zeros. The attached document has two tabs; one that displays how the data comes into excel titled "Data" and one titled "Desired Output" with the desired output from the macro.
View 4 Replies
View Related
Aug 15, 2007
I am trying to make a worksheet change the fill color depending on the data in the cells. I have two issues I cannot find the answers to.
View 12 Replies
View Related
Mar 7, 2007
how format or programing any cell for only accept numeric value and not alphanumeric value.
View 12 Replies
View Related
Dec 17, 2012
How to use data validation to restrict the input format into a cell. I'm trying to limit a cell to the following format: either ###/###' or ##/##'. NOTE: the apostrophe at the end. Here is what I've been trying to get the thing to work for the 2nd case:
=AND(ISNUMBER(LEFT(H1,2)+0),MID(H1,3,1)="/",ISNUMBER(RIGHT(H1,2)+0),MID(H1,3,1)="'")
But I'm getting an error when I input a test into the cell, e.g. 12/45'.
View 9 Replies
View Related
Dec 6, 2006
I am trying to slim down my database results in Excel via MS Query by searching for Part ID's that are numeric (we have parts that also contain letters....I want to weed those out).
In all my searching on the web, I thought the ISNUMERIC() function should be the function for this, but I keep getting an ORA-00904::"ISNUMERIC":invalid identifier....
Is this function supposed to work or is there another function that will do this
This is my SQL statement so far, which works to get parts that are 6 characters long only:
SELECT PART.ID
FROM SYSADM.PART PART
WHERE (LENGTH(PART.ID)=6)
When I change it to this to get parts that are numeric, it gives the error above:
SELECT PART.ID
FROM SYSADM.PART PART
WHERE (LENGTH(PART.ID)=6) AND (ISNUMERIC(PART.ID)=1)
View 9 Replies
View Related
May 24, 2006
I need to be able to take a string & remove all non numeric data. If I had "(123) 456-7890" I would want it to return "1234567890".
View 6 Replies
View Related
Jul 13, 2006
I have a combo box where I select "Income" or "Expense". In relation to that, In the next column called "Category", I use the offset formula in "Validation". Depending on whether I choose Income or Expense, I will get different dropdown options for "Category". What I want to do is if I choose Expense, in the column named "Amount" beside category, I want to have it so that it places the numbers in brackets or simply a negative sign. Just as reference, I use the SUM function to total up the numbers at the bottom of the sheet.
I have attached a sample copy "Data Validation Test"
View 4 Replies
View Related
Jan 5, 2009
I have two exported lists of data to compare from my newsletter program. One is the list of email addresses that I sent the newsletter to and the other is a list of the bounced email addresses.
Question: How can I extract the bounced emails from the list of sent email addresses?
In other words I want a list of clean, sendable email addresses.
View 10 Replies
View Related
Nov 18, 2013
My query is , I require the UCF column for the ID having maximum number (last five digits) of UCF column for the respective year column values
IDUCF Yr
559589876543212610007971212
559589876543212610000333712
559589876543213610004703013
563829876543212630000323912
My answer should be like below (or) having an additional column saying Active/Inactive.
IDUCF Yr
559589876543212610007971212
559589876543213610004703013
563829876543213630004703113
563829876543212630002782312
View 1 Replies
View Related
Jan 4, 2014
I need to convert numeric data to proper dates. Example: a cell currently reads 100875 but I need it to display 10/08/1975.
I've already found a VBA script that properly formats new data as you enter it (keying 1298 results in 1/2/1998), and I'm familiar with using =DATE(left,mid,right) to coerce Excel into spitting out a date in a certain format.
The difficulty I'm having is that I need to make existing data display correctly, without adding another column to accommodate reinterpretation of said existing data through a formula. Essentially I'm looking to avoid having to re-key several thousand date entries.
View 4 Replies
View Related
Nov 21, 2008
In column A I have alpha-numeric data similar to:
2
A1
3
A20
A186
B4
B13
1
C5
C3
And I need to sort them so that they are like:
1
2
3
A1
A20
A186
B4
B13
C3
C5
With the numbers first, in ascending order. Then the letters, grouped by letter ascending, and the number following them. But I can't have it where it looks at the first number after the letter (A1,A186,A20). It has to look at the WHOLE number and then sort it.
View 6 Replies
View Related
Nov 21, 2008
In column A I have alpha-numeric data similar to:
2
A1
3
A20
A186
B4
B13
1
C5
C3
And I need to sort them so that they are like:
1
2
3
A1
A20
A186
B4
B13
C3
C5
With the numbers first, in ascending order. Then the letters, grouped by letter ascending, and the number following them. But I can't have it where it looks at the first number after the letter (A1,A186,A20). It has to look at the WHOLE number and then sort it.
View 5 Replies
View Related