# Seperating Alphabets From Numbers In A String

Nov 17, 2006I need to separate alphabets and numbers in a string ...

Example,

Hotel Crowne Plaza 675.00 USD

How can I read only the numbers (675.00) ???

I need to separate alphabets and numbers in a string ...

Example,

Hotel Crowne Plaza 675.00 USD

How can I read only the numbers (675.00) ???

ADVERTISEMENT

make equation to remove alphabet characters from a text mixed with alphanumeric characters like below.

eg.

1.ASD000234234-1RST to 00234234-1

2.ZYXW2343WE to 2343

3.abcde2023820eiwls to 2023820

like this

I would like to create 384 by 2 table such as below. One column has series of alphabets (A-P) using 24 cells for each letter and other column has series of number (1-24) for each corresponding letter on left column.

A

1

A

2

A

3

...

...

A

24

B

1

B

2

...

...

P

23

P

24

I tried my best using my limited knowledge of VBA but macro fails by overwriting entire column in each loop (This code is for only one column, but I want to make two columns shown above).

Code:

Sub alphabetNumber()

Dim e As Long, f As Long

For f = 1 To 16

For e = 4 To 387 Step 24

Range(Cells(e, 2), Cells(e + 23, 2)) = Chr(64 + f)

Next e

Next f

End Sub

Hi, Column C has a bunch of addresses that have no spaces between the number and street. (27smith lane instead of 27 smith lane). Is there a way for me to quickly seperate the number and street name from the preceding number in each cell of column c? There are 1075 cells in column C.

View 10 Replies View RelatedI want to do is take this kind of thing all from one column:

COLA

1 blah blue

green

13 black grey brown

and put it into two columns, one with only the numbers, and the other with only the text.

COLB

1

13

COL C

blah blue

green

black grey brown

Also, I want to be able to then take that data from COL B and C and have it raw so that I can edit it easily by simply selecting row3 in COLB and change it from 13 to 4 (or whatever.)

I have a cell that contains a random number, spaces and other random numbers and at the end of this are words that name up a customer name.

Is there a formula that I can use that would just extract the letters only (i.e. the customer name)?

Is it possible to convert :

Nine Hundred Sixty Three Thousand Seven Hundred Eighty One

Eight Hundred Seventy Eight Thousand Eight Hundred Seventy Eight

Eight Hundred Twenty Two Thousand Seven Hundred Eighty Four

Eight Hundred Twenty Six Thousand One Hundred Eighty Nine

Nine Hundred Three Thousand Nine Hundred Six

to numeric...

EG:

963781

878878

872784

903906

I have a large block of text containing hundreds of serial numbers that I want to extract from the text into their own cells. If I paste the text directly into excel then the whole lot goes into 1 cell. The serial numbers I need are individually wrapped in brackets so I wandered if it was possible to paste the block of text into excel using both '(' and ')' as value seperators.

View 3 Replies View RelatedI have a column that contains 2 different types of data, "repairs" and "engineering". how do I seperate the 2 into two seperate lists?

View 9 Replies View RelatedI am copying data from a PDF. The data I need is in columns, spread over hundreds of sheets. I would like the data in the same layout (columns), but need it in excel instead of the PDF sheets.

I've tried copying and pasting into Excel, but the problem is that what is in columns on the PDF ends up as multiple rows beneath eachother, all in column A, on excel.

I've tried Text to columns, but that seems to only work if all the data you need to seperate is in the same row. What I need to ultimately appear in one row is currently displaying in three rows, one beneath the other. Is there a way for excel to automatically move what's in cell A2, for example, to B1 (and do this for all data, all the way down the sheet, that's similar to that currently in A2?

(If it would be useful for me to post a screenshot, could someone reply with how to do that in the most version of Excel?)

I have a phrase in a listbox formated as such: "Company Name / Company ID # / City, State"

I need to be able to seperate the values out into seperate categories:

Company Name

Company ID #

City

State

Is there any way to do this within the code?

Is there any formula or formatting (not a macro) that will list in a seperate table all names that occur equal to or more than a specified number of times?

eg: I have a list of names(below) that I want excel to go through and automatically place the recurring names in a seperate table.

Gus

Bob

Mike

John

Gus

Nick

Mike

Gus

So Gus and Mike would be listed in the other table.

I have hundreds of file names, and to cut a long explanation short, they are exported as a CSV file to excel. In order indentify the owner of the file I need to rename the file with a commar where you see the dash or the underscore in order to have the name appear in the next cell, as can be seen with Syma and Kevin below, so I can then sort the columns etc etc.

I know there is a formula that I can use to achieve this, ie have syma.pdf and kevinc.pdf in the next cell.

I think it works on identifying how many characters along the name and then send i to the next cell.

as you can see below, there is no set amount of characters to put into a formula.

Could I say, for example, if after dash /underscore put next word in next cell?

t5 mon a2 w6-syma-0003.pdft5 mon cst w2_dellwynneh.pdft5 mon a23 w3_MASUMS.pdft5 mon cmn201a w1- syma.pdft5 thurs wiabe w2_kevinc.pdft5 thurs wiabe2 w2_kevinc.pdf

I have a field that contains the following: 012100002030

I need a formula that will tell me whether or not the string contains a number higher than 2 or whether or not it contains more than one 2.

Examples:

001000002011

111111000022

401110000000

the first loan would not meet the criteria as it contains no number higher than 2 and only contains one 2.

the second loan would meet the criteria as it contains two 2's.

the 3rd loan would meet the criteria as it contains a number higher than 2.

I have some data that is seperated by spaces. I need to split the data so each is in a seperate cell and then remove the spaces. I can do this if there is only one space inbetween the data, but that is not always the case. I attach a workbook with examples.

View 6 Replies View RelatedI am posting the worksheet so that it may be a little clearer. I have 2 worksheets, the input area and the model area.

In the input area, users will input their data with a maximum of 5 beverage items and 10 food items along with a certain number of other data inputs.

In the model area, i would like to seperate the food items from the beverage items along with their corresponding other information as you can see in the spreadsheet i posted.

However, food items can vary in number up to 10 as well as beverage up to 5. Also, users may enter the beverage and food items in any order they wish to.

Could you help me figure out a way to transfer my data from the input area to the model area and sorting the beverage and food items so that beverage and foods go into their specific zones? i will be performing calculations which are different from food and beverages.

I have a 25k line spreadsheet w/ 37 columns in use. The spreadsheet is organized by sales rep among others data. Is there a way i can insert some kind of command to auto seperate or copy all the data associataed w/ "rep1" into one tab, then "rep2" into another and so on?

View 7 Replies View RelatedI have a requirement where I want my list should auto increment with number only.

For example: I want to fill below text in cell and when I drag the cell( Along the column A) and fill the rows downward it should automaticallly incremented.

Data in one cell say (A1) is like 001_TCO_CM, now I want to drag data present in cell A1 and wants data in cell A2, A3, A4 etc... it should get increment like

A2 = 002_TCO_CM

A3 = 003_TCO_CM

A4 = 004_TCO_CM

and so on...any method or way present in Excel 2003 so that my series should get auto filled.

I maintain a spreadsheet to track monthly sales of a few thousand items (see attached sample data). I'd like to have a formula that would sum only the last 12 months in the range of data. It would need to ignore all of the data before and the blank cells after the 12 months.

It's difficult to update the range each month for all of the products.

I have data like follwing strings.

WAY-308312-1

WAY-521340-1

233-6767-676-6

First two strings are correct. If I get number like in third string first part of string then we have to move row to some other sheet.

The first part of string should have text like WAY-123-13-1.

I used Val function it checking first charector only. It the string is like 2A1A-243-233-2 the it is not checking.

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.

111.222.333.444

I need a formula to extract the numbers from data in a cell:

Examples of data in cells:

G 622 ENTERTAINMENT ( I need to extract 622 )

D 6129 TOYS ( I need to extract 6129)

C 1039 Toddler TOYS ( I need to extract 1039 )

R 05 VEHICLES (I need to extract 5 )

All the cells have spaces before an alphabetical identifier, then a space ( it could be more than one in some cases ), then a number ( between 1 and 4 digits ), then a space and a description.

The table below is a portion of a calendar to track vacation and sick time. What I am trying to do is add all the hours of vacation ("V") and sick ("E") time that an employee has used in a cell at the end of each row which represents a month. So there are 31 cells that I need to look in and if it contains V... sum in the vacation cell. There may be a space after the letters and there may not be. They can also start with a decimal.

month

1

2

3

4

5

Vacation

Sick

January

E8

V8

V.5

V6.25

E .5

Sum of V (should be 14.25)

Sum of E

I am struggling with a problem which involves a column with both the text and nos in that. I want to calculate the following formula.

Total = the Sumproduct of the nos in the description*Length*Width*Height.

In the description column,

1) The nos will be varying i.e x*x or x*x*x or X*x*x*x*.

2) After the nos there will not be any data.

Example table:

Work Description

Length

Width

Height

Total

Parapet wall 2x4x8

12

2

4

6144

[Code] .......

Is there a way to achieve this, what is the formula for this ??

I am looking for formulae to identify the first 20 non-zero numbers from a string of alphanumerical and non alphanumeric characters

EG If column A any data such as:

123

0123

01(2)3

0.123

123abc

0123abc

01(2)3abc

0.123abc

a1b2c3

1a2b3c

Then the corresponding row for column B would return 123

Using help from my maths Prof and some IT bods, i have so-far come up with the array-formula:

=1*MID(A7,MATCH(FALSE,ISERROR(1/MID(A7,ROW(1:100),1)),0),20)

assuming that the total string is not more than 100 characters.

is there a way to have the number formatting in Text() variable? For instance, I want to reference a cell that can change between $1.00 and $10,000,000.00.

Let's say that in A3, the number turns out to be $10,000.00.

When I put in text(a3,"$0.00") it spits out $10000.00. But if I go the other route and go text(a3,"$000,000,000) it displays "$000,010,000.00".

I have a list of data, 7 coumns x 4000 rows with integers in them. b2:h4173

I would like to write a forumula(e) which will tell me which 3 integers appear in the same row most often.

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 am trying to find numbers from a string. I have for example words "EUR Fwd 9x12" and "Eur Fwd 11x15" And i want to write a function that reads the first number from a string if there is only one number before "x" or two numbers if there are 2 numbers. So I have tried to build following function:

Function NumbersInString(Word As String) As Integer

Dim i As Integer

Dim FirstNumberInString As Integer, SecondNumberInString As Integer

For i = 1 To Len(Word)

If IsNumeric(Mid(Word, i, 1)) Then

FirstNumberInString = Mid(Word, i, 1)

If IsNumeric(Mid(Word, i + 1, 1)) = False Then

Exit Function

Else

SecondNumberInString = Mid(Word, i + 1, 1)

End If

End If

Next

NumbersInString = FirstNumberInString & SecondNumberInString

End Function

A given string of some letters (from three to five, six) is followed by a single number (1-4). Then it ends, or is followed by another such combination, up to a maximum of, let's say, four.

Example:

xxxx1

yyy3yyyy1

xyzxx1yxz4xzx1

xxx2xxx2xxx2xxx2

What I would like to do is to divide a given chain of characters into the smallest chains which contain only letters and one number. To the examples given above, I'd like to receive the following sets:

xxxx1

yyy3 and yyyy1

xyzxx1 and yxz4 and xzx1

... and so on

Is it somehow possible to do it with simple functions? Or is VB necessary (which sadly I don't know)?

I have textstrings which have numbers between questionmarks included which I want to have deleted.

Here is an example : This ?112? is text 12 and this must ?9? be deleted.

I want to have it as : This is text 12 and this must be deleted.

Is this possible with the 'Substitute' function or is there another way to do this?

In a data report i have a column which contains a mix of text and may contain an 8 digit number which could start in 0.

for example

in column A i could have "Hello how are you 01237232 I am fine"

I wish to extract the number into a seperate column, and would ordinarilly use a mid or left/ right function, however the text infront and behind the number will vary in length, which means i cannot do this.

The number will always be 8 digits, could start in 0 but will not always, and it may not be present in all the cells in this column.

How I an achieve this?

I have a list (SIC Codes) and I want to remove the numbers. The numbers range from 2 to 8 deep. The list exists in column B and I want the new list in column C.

01 Agricultural Production Crops

011 Cash Grains

0111 Wheat

0112 Rice

0115 Corn

0116 Soybeans

0119 Cash grains, nec

011901 Pea and bean farms (legumes)

01190101 Bean (dry field and seed) farm

01190102 Cowpea farm

01190103 Lentil farm

01190104 Mustard seed farm

I need to add 2 to 6 zeros to the end of string of numbers beginning in A2:

01

011

0111

0112

011901

The end result, all numbers must be 8 characters long.

i want Counting duplicate numbers in a string for example Counting 2

22241278-------- Count(2)=4

I have several lines with text strings containting three numbers in each line. I need a code to extract all three numbers from each text string. The numbers can be placed on the following columns in each row.

View 2 Replies View RelatedI've got some data which will look something like the following:

987249879238Steven1987dob98023498092384029834Tom1972dob298374928374928374987

I'm looking to remove any set of numbers more than 10 characters long. i.e. the desired output from the above would be:

Steven1987dobTom1972dob

I'm looking for a way to extract the data after the first space in a string to after the first set of numbers (always 8 digits). The formula I'm using is not accurate since the number of words that appears between the first space to the first set of numbers changes.

Sheet2ABC1Desired results2277 xxx spzrtmhk

companies 12345678 231516990 2475.06 3199.57 23.19 street 1 739.00xxx spzrtmhk

companies12345678 231516990xxx spzrtmhk companies 1234567831528 dts powertrain comp inc

15981808 231516989 43.55 84.40 48.40 5.00dts

[Code] ...........

Is there a way to separate text from numbers, (other than text to columns)

My data is all different lengths, nothing consistent,plus I want to put the separated data in another column.

Anyone know how to do this?

View 9 Replies View Related
Copyrights 2005-15 www.BigResource.com, All rights reserved